[PATCH 1 of 3] clone: update to @ bookmark if it exists

Kevin Bullock kbullock at ringworld.org
Fri Jul 6 15:18:28 CDT 2012


On Jul 6, 2012, at 2:16 PM, Augie Fackler wrote:

> # HG changeset patch
> # User Kevin Bullock <kbullock at ringworld.org>

I ok'd Augie re-sending this. Originally sent May 15th, but dropped at the time for further discussion of how bookmarks should work as a whole.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock

> # Date 1332366819 18000
> # Node ID 7cde29762eb10651860ecb2497b642880020f446
> # Parent  01d847e0fdc9578ae2f94b42291bcb6a6e5bf89e
> clone: update to @ bookmark if it exists
> 
> diff --git a/mercurial/hg.py b/mercurial/hg.py
> --- a/mercurial/hg.py
> +++ b/mercurial/hg.py
> @@ -387,7 +387,7 @@
>                     checkout = update
>                     if srcrepo.local():
>                         checkout = srcrepo.lookup(update)
> -                for test in (checkout, 'default', 'tip'):
> +                for test in (checkout, '@', 'default', 'tip'):
>                     if test is None:
>                         continue
>                     try:
> diff --git a/tests/test-clone.t b/tests/test-clone.t
> --- a/tests/test-clone.t
> +++ b/tests/test-clone.t
> @@ -465,6 +465,16 @@
>   $ rm -r ua
> 
> 
> +Test clone with special '@' bookmark:
> +  $ cd a
> +  $ hg bookmark -r a7949464abda @  # branch point of stable from default
> +  $ hg clone . ../i
> +  updating to branch default
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  $ hg id -i ../i
> +  a7949464abda
> +
> +
> Testing failures:
> 
>   $ mkdir fail
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120706/add66460/attachment.html>


More information about the Mercurial-devel mailing list