Fix duplication typos in marks file migration.

Fixes mnauw/git-remote-hg#1
This commit is contained in:
Mark Nauwelaerts
2016-11-12 16:13:37 +01:00
parent a59e1246a2
commit a35f93cbc1

View File

@@ -1602,7 +1602,7 @@ def select_marks_dir(alias, gitdir, migrate):
hgm = os.path.join(shared_dir, d, 'marks-hg')
# 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 \
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):
warn('using marks of remote %s as shared marks' % (d))
seen_file = True
@@ -1613,7 +1613,7 @@ def select_marks_dir(alias, gitdir, migrate):
seen_file = True
os.remove(p)
# 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')
elif migrate:
if not os.path.exists(shared_gm) or not os.path.exists(shared_hgm):