changeset 23625:3a8a85469ee8

share: fix source repo lookup on Windows The stored path contains platform specific separators, so splitting on '/.hg' returned the string unmodified on Windows. The source was then looked for in $source/.hg/.hg, which obviously fails. This caused cascading errors in test-share.t relating to the recent bookmark support.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 18 Dec 2014 23:16:37 -0500
parents 861ddedfb402
children 012a7b482d68
files hgext/share.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/share.py	Mon Dec 22 03:20:50 2014 +0100
+++ b/hgext/share.py	Thu Dec 18 23:16:37 2014 -0500
@@ -96,7 +96,7 @@
         # strip because some tools write with newline after
         sharedpath = repo.vfs.read('sharedpath').strip()
         # the sharedpath always ends in the .hg; we want the path to the repo
-        source = sharedpath.rsplit('/.hg', 1)[0]
+        source = repo.vfs.split(sharedpath)[0]
         srcurl, branches = parseurl(source)
         srcrepo = repository(repo.ui, srcurl)
     except IOError, inst: