summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-12-07 13:09:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-09 21:18:44 (GMT)
commite71d13787929d4a043cb3906cfa4afa69e5fd0db (patch)
treeeedfa43365ddf58630011607a7012f189b1b8045 /contrib/remote-helpers
parent0c0ebc1fdf57c3ac968e1afdadbc17b9010da6fa (diff)
downloadgit-e71d13787929d4a043cb3906cfa4afa69e5fd0db.zip
git-e71d13787929d4a043cb3906cfa4afa69e5fd0db.tar.gz
git-e71d13787929d4a043cb3906cfa4afa69e5fd0db.tar.bz2
remote-hg: fix 'shared path' path
If the repository is moved, the absolute path of the shared repository would fail. Make sure it's always up-to-date. Reported-by: Michael Davis <mjmdavis@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 852fdcf..eb89ef6 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -415,6 +415,9 @@ def get_repo(url, alias):
local_path = os.path.join(dirname, 'clone')
if not os.path.exists(local_path):
hg.share(myui, shared_path, local_path, update=False)
+ else:
+ # make sure the shared path is always up-to-date
+ util.writefile(os.path.join(local_path, '.hg', 'sharedpath'), hg_path)
repo = hg.repository(myui, local_path)
try: