mercurial/bookmarks.py
branchstable
changeset 23081 e62c330a044f
parent 22941 da2758c0aca0
child 23199 c35ffa4249ca
--- a/mercurial/bookmarks.py	Fri Oct 24 15:52:20 2014 -0500
+++ b/mercurial/bookmarks.py	Fri Oct 24 10:40:37 2014 -0700
@@ -271,6 +271,7 @@
     :diverge: diverge
     :differ:  changed, but changeset referred on src is unknown on dst
     :invalid: unknown on both side
+    :same:    same on both side
 
     Each elements of lists in result tuple is tuple "(bookmark name,
     changeset ID on source side, changeset ID on destination
@@ -299,12 +300,9 @@
     else:
         srcmarkset = set(srcmarks)
         dstmarkset = set(dstmarks)
-        bset = srcmarkset ^ dstmarkset
-        for b in srcmarkset & dstmarkset:
-            if srchex(srcmarks[b]) != dsthex(dstmarks[b]):
-                bset.add(b)
+        bset = srcmarkset | dstmarkset
 
-    results = ([], [], [], [], [], [], [])
+    results = ([], [], [], [], [], [], [], [])
     addsrc = results[0].append
     adddst = results[1].append
     advsrc = results[2].append
@@ -312,6 +310,7 @@
     diverge = results[4].append
     differ = results[5].append
     invalid = results[6].append
+    same = results[7].append
 
     for b in sorted(bset):
         if b not in srcmarks:
@@ -324,7 +323,9 @@
         else:
             scid = srchex(srcmarks[b])
             dcid = dsthex(dstmarks[b])
-            if scid in repo and dcid in repo:
+            if scid == dcid:
+                same((b, scid, dcid))
+            elif scid in repo and dcid in repo:
                 sctx = repo[scid]
                 dctx = repo[dcid]
                 if sctx.rev() < dctx.rev():
@@ -365,7 +366,7 @@
 def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()):
     ui.debug("checking for updated bookmarks\n")
     localmarks = repo._bookmarks
-    (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
+    (addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same
      ) = compare(repo, remotemarks, localmarks, dsthex=hex)
 
     status = ui.status