Skip to content

Commit e71d137

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0c0ebc1 commit e71d137

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contrib/remote-helpers/git-remote-hg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ def get_repo(url, alias):
415415
local_path = os.path.join(dirname, 'clone')
416416
if not os.path.exists(local_path):
417417
hg.share(myui, shared_path, local_path, update=False)
418+
else:
419+
# make sure the shared path is always up-to-date
420+
util.writefile(os.path.join(local_path, '.hg', 'sharedpath'), hg_path)
418421

419422
repo = hg.repository(myui, local_path)
420423
try:

0 commit comments

Comments
 (0)