[PATCH 3 of 3 STABLE v2] exchange: don't report failure from identical bookmarks

Gregory Szorc gregory.szorc at gmail.com
Fri Oct 24 13:08:00 CDT 2014


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1414172678 25200
#      Fri Oct 24 10:44:38 2014 -0700
# Branch stable
# Node ID 3beb05f882b8a6fb2ae1fc702194f9e424edddf9
# Parent  7773b325a83a08183435da11113a9b63838eae58
exchange: don't report failure from identical bookmarks

This patch fixes the regression introduced by b901645a8784 by having the
bookmark error reporting code filter identical bookmarks.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -354,8 +354,12 @@ def _pushdiscoverybookmarks(pushop):
         if b in explicit:
             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)
         # we should probably list all of them
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
@@ -456,13 +456,11 @@ pushing an unchanged bookmark should res
   adding file changes
   added 1 changesets with 1 changes to 1 files
   exporting bookmark @
 
-BUGGY We should simply say "no changes found"
   $ hg push -B @ ../unchanged-b
   pushing to ../unchanged-b
   searching for changes
-  bookmark @ does not exist on the local or remote repository!
   no changes found
-  [2]
+  [1]
 
   $ cd ..


More information about the Mercurial-devel mailing list