| From | Sent On | Attachments |
|---|---|---|
| Kevin Bullock | May 15, 2012 1:52 pm | |
| Matt Mackall | May 17, 2012 8:34 am |
| Subject: | [PATCH] clone: update to @ bookmark if it exists | |
|---|---|---|
| From: | Kevin Bullock (kbul...@ringworld.org) | |
| Date: | May 15, 2012 1:52:56 pm | |
| List: | com.selenic.mercurial-devel | |
# HG changeset patch # User Kevin Bullock <kbul...@ringworld.org> # Date 1332366819 18000 # Node ID 2814cc3a76576b277ff47d080196cf60ed773d55 # Parent 6831b878aada3156330ddc4c412232d861d3e3c6 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 @@ def clone(ui, peeropts, source, dest=Non 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 @@ -458,3 +458,13 @@ iterable in addbranchrevs() updating to branch stable 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ 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
_______________________________________________ Mercurial-devel mailing list Merc...@selenic.com http://selenic.com/mailman/listinfo/mercurial-devel





