diff --git a/mercurial/exchange.py b/mercurial/exchange.py index e62c330a044fb77c158804b16121af65268ad53d_bWVyY3VyaWFsL2V4Y2hhbmdlLnB5..0fc4686de1d762844c21f134bc6fdb010b7e6ec5_bWVyY3VyaWFsL2V4Y2hhbmdlLnB5 100644 --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -355,6 +355,10 @@ explicit.remove(b) # treat as "deleted locally" pushop.outbookmarks.append((b, dcid, '')) + # identical bookmarks shouldn't get reported + for b, scid, dcid in same: + if b in explicit: + explicit.remove(b) if explicit: explicit = sorted(explicit) diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t index e62c330a044fb77c158804b16121af65268ad53d_dGVzdHMvdGVzdC1ib29rbWFya3MtcHVzaHB1bGwudA==..0fc4686de1d762844c21f134bc6fdb010b7e6ec5_dGVzdHMvdGVzdC1ib29rbWFya3MtcHVzaHB1bGwudA== 100644 --- a/tests/test-bookmarks-pushpull.t +++ b/tests/test-bookmarks-pushpull.t @@ -438,3 +438,29 @@ cc978a373a53 tip W $ cd .. + +pushing an unchanged bookmark should result in no changes + + $ hg init unchanged-a + $ hg init unchanged-b + $ cd unchanged-a + $ echo initial > foo + $ hg commit -A -m initial + adding foo + $ hg bookmark @ + $ hg push -B @ ../unchanged-b + pushing to ../unchanged-b + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + exporting bookmark @ + + $ hg push -B @ ../unchanged-b + pushing to ../unchanged-b + searching for changes + no changes found + [1] + + $ cd ..