mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-03-21 01:01:27 +01:00
Handle platform dependency in atomic file renaming
This commit is contained in:
@@ -1489,6 +1489,11 @@ def do_push_refspec(parser, refspec, revs):
|
||||
if tmpmarks and os.path.exists(tmpmarks):
|
||||
if ok and not dry_run:
|
||||
# the commits made it through, now we can commit
|
||||
# sigh ... no atomic rename for existing destination on some platform ...
|
||||
# (use unofficial platform check)
|
||||
if os.sep != '/':
|
||||
if os.path.exists(marks):
|
||||
os.remove(marks)
|
||||
os.rename(tmpmarks, marks)
|
||||
revs[:] = nparser.context.revs
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user