atom feed16 messages in com.selenic.mercurial-devel[PATCH v2] bookmarks: pull new bookma...
FromSent OnAttachments
Levi BardMay 12, 2012 8:01 am 
Matt MackallMay 12, 2012 8:23 am 
Kevin BullockMay 14, 2012 10:42 am 
Augie FacklerMay 14, 2012 1:09 pm 
Kevin BullockMay 14, 2012 2:18 pm 
Angel EzquerraMay 14, 2012 2:38 pm 
Martin GeislerMay 15, 2012 2:05 am 
Pierre-Yves DavidMay 15, 2012 5:05 am 
Matt MackallMay 15, 2012 3:18 pm 
Angel EzquerraMay 15, 2012 9:57 pm 
Pierre-Yves DavidMay 16, 2012 1:31 am 
Martin GeislerMay 16, 2012 3:12 am 
Pierre-Yves DavidMay 16, 2012 3:14 am 
Angel EzquerraMay 16, 2012 4:00 am 
Martin GeislerMay 16, 2012 4:53 am 
Kevin BullockMay 16, 2012 8:33 am 
Subject:[PATCH v2] bookmarks: pull new bookmarks from remote by default
From:Levi Bard (takt@gmail.com)
Date:May 12, 2012 8:01:27 am
List:com.selenic.mercurial-devel

# HG changeset patch # User Levi Bard <le@unity3d.com> # Date 1336834801 -7200 # Node ID c3fe1f84a74161cd84ab2c85d78985429fed69c2 # Parent 76c744e0c5bbd0900beba49787b7e04ba862939b bookmarks: pull new bookmarks from remote by default

diff -r 76c744e0c5bb -r c3fe1f84a741 mercurial/bookmarks.py --- a/mercurial/bookmarks.py Sat May 12 13:20:26 2012 +0200 +++ b/mercurial/bookmarks.py Sat May 12 17:00:01 2012 +0200 @@ -221,6 +221,11 @@ repo._bookmarks[n] = cr.node() changed = True ui.warn(_("divergent bookmark %s stored as %s\n") % (k, n)) + elif rb[k] in repo: + # add remote bookmarks for changes we already have + repo._bookmarks[k] = rb[k] + changed = True + ui.status(_("adding remote bookmark %s\n") % k)

if changed: write(repo) diff -r 76c744e0c5bb -r c3fe1f84a741 tests/test-bookmarks-pushpull.t --- a/tests/test-bookmarks-pushpull.t Sat May 12 13:20:26 2012 +0200 +++ b/tests/test-bookmarks-pushpull.t Sat May 12 17:00:01 2012 +0200 @@ -29,6 +29,8 @@ adding file changes added 1 changesets with 1 changes to 1 files updating bookmark Y + adding remote bookmark X + adding remote bookmark Z (run 'hg update' to get a working copy) $ hg bookmarks Y 0:4e3505fd9583 @@ -43,6 +45,8 @@ $ hg pull -B X ../a pulling from ../a no changes found + adding remote bookmark X + adding remote bookmark Z importing bookmark X $ hg bookmark X 0:4e3505fd9583 @@ -122,6 +126,7 @@ adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) divergent bookmark X stored as X@foo + adding remote bookmark Z (run 'hg heads' to see heads, 'hg merge' to merge) $ hg book * X 1:9b140be10808 @@ -159,9 +164,9 @@ namespaces $ hg debugpushkey http://localhost:$HGPORT/ bookmarks Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 + foobar 9b140be1080824d768c5a4691a564088eede71f9 + foo 0000000000000000000000000000000000000000 X 9b140be1080824d768c5a4691a564088eede71f9 - foo 0000000000000000000000000000000000000000 - foobar 9b140be1080824d768c5a4691a564088eede71f9 $ hg out -B http://localhost:$HGPORT/ comparing with http://localhost:$HGPORT/ searching for changed bookmarks @@ -182,6 +187,9 @@ $ hg pull -B Z http://localhost:$HGPORT/ pulling from http://localhost:$HGPORT/ no changes found + adding remote bookmark foobar + adding remote bookmark Z + adding remote bookmark foo divergent bookmark X stored as X@1 importing bookmark Z $ hg clone http://localhost:$HGPORT/ cloned-bookmarks diff -r 76c744e0c5bb -r c3fe1f84a741 tests/test-hook.t --- a/tests/test-hook.t Sat May 12 13:20:26 2012 +0200 +++ b/tests/test-hook.t Sat May 12 17:00:01 2012 +0200 @@ -195,6 +195,7 @@ no changes found listkeys hook: HG_NAMESPACE=phases
HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing':
'True'} listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar':
'0000000000000000000000000000000000000000', 'foo':
'0000000000000000000000000000000000000000'} + adding remote bookmark bar importing bookmark bar $ cd ../a

@@ -279,6 +280,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files + adding remote bookmark quux (run 'hg update' to get a working copy) $ hg rollback repository tip rolled back to revision 3 (undo pull) @@ -447,6 +449,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files + adding remote bookmark quux (run 'hg update' to get a working copy)

make sure --traceback works