changeset 22629:b3f74b405c20

bookmarks: fix divergent bookmark path normalization
author Matt Mackall <mpm@selenic.com>
date Thu, 02 Oct 2014 16:43:50 -0500
parents 2805d23e1f88
children 0290982e5ac7
files mercurial/bookmarks.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Thu Oct 02 11:35:20 2014 -0500
+++ b/mercurial/bookmarks.py	Thu Oct 02 16:43:50 2014 -0500
@@ -338,9 +338,11 @@
             break
     # try to use an @pathalias suffix
     # if an @pathalias already exists, we overwrite (update) it
-    path = str(util.url(path))
+    if path.startswith("file:"):
+        path = util.url(path).path
     for p, u in ui.configitems("paths"):
-        u = str(util.url(path))
+        if u.startswith("file:"):
+            u = util.url(u).path
         if path == u:
             n = '%s@%s' % (b, p)
     return n