mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-07-07 19:23:00 +02:00
Store marks only on success
Commit 2594a79 (remote-hg: fix bad state issue) originally introduced this code in order to avoid synchronization issues while pushing, because `git fast-export` might end up writing the marks before a crash in the remote helper occurs. However, the problem is in `git fast-export`; the marks should only be written after both have finished successfully. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -1255,12 +1255,10 @@ def main(args):
|
||||
die('unhandled command: %s' % line)
|
||||
sys.stdout.flush()
|
||||
|
||||
marks.store()
|
||||
|
||||
def bye():
|
||||
if not marks:
|
||||
return
|
||||
if not is_tmp:
|
||||
marks.store()
|
||||
else:
|
||||
if is_tmp:
|
||||
shutil.rmtree(dirname)
|
||||
|
||||
atexit.register(bye)
|
||||
|
||||
Reference in New Issue
Block a user