| From | Sent On | Attachments |
|---|---|---|
| Kevin Bullock | Oct 24, 2012 2:04 pm | |
| Augie Fackler | Oct 26, 2012 6:43 am | |
| Sean Farley | Oct 26, 2012 4:39 pm | |
| Pierre-Yves David | Oct 26, 2012 5:10 pm | |
| Kevin Bullock | Oct 26, 2012 10:23 pm | |
| Matt Mackall | Oct 27, 2012 3:41 pm | |
| Matt Mackall | Nov 1, 2012 11:50 am | |
| Pierre-Yves David | Nov 9, 2012 9:27 am |
| Subject: | [PATCH] bookmarks: active bookmark diverges if a pull would move it (issue3682) | |
|---|---|---|
| From: | Kevin Bullock (kbul...@ringworld.org) | |
| Date: | Oct 24, 2012 2:04:12 pm | |
| List: | com.selenic.mercurial-devel | |
# HG changeset patch # User Kevin Bullock <kbul...@ringworld.org> # Date 1351112598 18000 # Branch stable # Node ID 188c42046dfd1441455c63cdde13c0ef757d17a5 # Parent acd4577a568d22d3e58bab28600a5ce0a3f87ce1 bookmarks: active bookmark diverges if a pull would move it (issue3682)
Before this change, a pull could move the active bookmark (even backwards). This resulted in the bookmark no longer being active (but still being listed in .hg/bookmarks.current -- also see issue3683).
After this change, if a pull would move the active bookmark, the divergent bookmarks machinery is invoked, leaving the active bookmark where it was.
diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -196,7 +196,7 @@ def updatefromremote(ui, repo, remote, p cl = repo[nl] if cl.rev() >= cr.rev(): continue - if validdest(repo, cl, cr): + if validdest(repo, cl, cr) and k != repo._bookmarkcurrent: repo._bookmarks[k] = cr.node() changed = True ui.status(_("updating bookmark %s\n") % k) diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t --- a/tests/test-bookmarks-pushpull.t +++ b/tests/test-bookmarks-pushpull.t @@ -29,9 +29,9 @@ import bookmark by name
$ hg init ../b $ cd ../b - $ hg book Y + $ hg book --inactive Y $ hg book - * Y -1:000000000000 + Y -1:000000000000 $ hg pull ../a pulling from ../a requesting all changes
_______________________________________________ Mercurial-devel mailing list Merc...@selenic.com http://selenic.com/mailman/listinfo/mercurial-devel





