From: Felipe Contreras Date: Sat, 7 Dec 2013 13:09:42 +0000 (-0600) Subject: remote-hg: fix 'shared path' path X-Git-Tag: v1.9-rc0~46^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e71d13787929d4a043cb3906cfa4afa69e5fd0db?ds=sidebyside 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 Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 852fdcf517..eb89ef6779 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: