mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-05 02:55:40 +01:00
Fix duplication typos in marks file migration.
Fixes mnauw/git-remote-hg#1
This commit is contained in:
@@ -1602,7 +1602,7 @@ def select_marks_dir(alias, gitdir, migrate):
|
|||||||
hgm = os.path.join(shared_dir, d, 'marks-hg')
|
hgm = os.path.join(shared_dir, d, 'marks-hg')
|
||||||
# move marks to shared if no such yet (if origin or last one in line)
|
# move marks to shared if no such yet (if origin or last one in line)
|
||||||
if os.path.exists(gitm) and os.path.exists(hgm) and \
|
if os.path.exists(gitm) and os.path.exists(hgm) and \
|
||||||
not os.path.exists(shared_gm) and not os.path.exists(shared_gm) and \
|
not os.path.exists(shared_gm) and not os.path.exists(shared_hgm) and \
|
||||||
(d == 'origin' or not l):
|
(d == 'origin' or not l):
|
||||||
warn('using marks of remote %s as shared marks' % (d))
|
warn('using marks of remote %s as shared marks' % (d))
|
||||||
seen_file = True
|
seen_file = True
|
||||||
@@ -1613,7 +1613,7 @@ def select_marks_dir(alias, gitdir, migrate):
|
|||||||
seen_file = True
|
seen_file = True
|
||||||
os.remove(p)
|
os.remove(p)
|
||||||
# all private marks removed, should have shared
|
# all private marks removed, should have shared
|
||||||
if seen_file and (not os.path.exists(shared_gm) or not os.path.exists(shared_gm)):
|
if seen_file and (not os.path.exists(shared_gm) or not os.path.exists(shared_hgm)):
|
||||||
die('migration to shared marks failed; perform fetch to recover')
|
die('migration to shared marks failed; perform fetch to recover')
|
||||||
elif migrate:
|
elif migrate:
|
||||||
if not os.path.exists(shared_gm) or not os.path.exists(shared_hgm):
|
if not os.path.exists(shared_gm) or not os.path.exists(shared_hgm):
|
||||||
|
|||||||
Reference in New Issue
Block a user