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.
--- 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: