bookmarks: fix divergent bookmark path normalization
authorMatt Mackall <mpm@selenic.com>
Thu, 02 Oct 2014 16:43:50 -0500
changeset 22629 b3f74b405c20
parent 22628 2805d23e1f88
child 22630 0290982e5ac7
bookmarks: fix divergent bookmark path normalization
mercurial/bookmarks.py
--- 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