[PATCH] Fix for issue 2120: Bundle cloning not getting correct path
qwerty360
qwerty360 at gmail.com
Sun Apr 18 09:28:48 CDT 2010
For the benefit of people dealing with GSOC applications.
Also I havent had any feedback and as far as I am aware the patch hasnt been
used (lost in the crowd?)
On Sun, Apr 4, 2010 at 2:39 AM, <qwerty360 at gmail.com> wrote:
> # HG changeset patch
> # User Mark Determann <qwerty360 at gmail.com>
> # Date 1270344115 -3600
> # Node ID 222a3cf7f30ce71bb395922cfa01294fda55b90c
> # Parent cd0c49bdbfd9edab18c3656d8a8a0bd27a9aa82a
> Fix for issue 2120: Bundle cloning not getting correct path
>
> the fix changes clone in hg.py so that the path is made absolute if the
> source
> is an instance of localrepository (bundles and local repositories) and the
> destination
> is local (tested with the existing command).
>
> http://mercurial.selenic.com/bts/issue2120
>
> diff -r cd0c49bdbfd9 -r 222a3cf7f30c mercurial/hg.py
> --- a/mercurial/hg.py Thu Apr 01 17:51:59 2010 -0500
> +++ b/mercurial/hg.py Sun Apr 04 02:21:55 2010 +0100
> @@ -243,10 +243,14 @@
> if islocal(dest):
> dir_cleanup = DirCleanup(dest)
>
> - abspath = origsource
> copy = False
> + if (isinstance(src_repo, localrepo.localrepository)) and
> islocal(dest):
> + origsource = os.path.abspath(util.drop_scheme('file',
> origsource))
> + abspath = os.path.abspath(util.drop_scheme('bundle',
> origsource))
> + else:
> + abspath = origsource
> +
> if src_repo.cancopy() and islocal(dest):
> - abspath = os.path.abspath(util.drop_scheme('file',
> origsource))
> copy = not pull and not rev
>
> if copy:
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100418/16e7c7ad/attachment.htm>
More information about the Mercurial-devel
mailing list