##// END OF EJS Templates
undo-files: use the cleanup function in streamclone...
marmoute -
r51187:97e91001 stable
parent child Browse files
Show More
@@ -7,7 +7,6 b''
7 7
8 8
9 9 import contextlib
10 import errno
11 10 import os
12 11 import struct
13 12
@@ -21,6 +20,7 b' from . import ('
21 20 narrowspec,
22 21 phases,
23 22 pycompat,
23 repair,
24 24 requirements as requirementsmod,
25 25 scmutil,
26 26 store,
@@ -29,9 +29,6 b' from . import ('
29 29 from .revlogutils import (
30 30 nodemap,
31 31 )
32 from .utils import (
33 stringutil,
34 )
35 32
36 33
37 34 def new_stream_clone_requirements(default_requirements, streamed_requirements):
@@ -935,15 +932,4 b' def local_copy(src_repo, dest_repo):'
935 932 dest_repo.store.write(tr)
936 933
937 934 # clean up transaction file as they do not make sense
938 undo_files = [(dest_repo.svfs, b'undo.backupfiles')]
939 undo_files.extend(dest_repo.undofiles())
940 for undovfs, undofile in undo_files:
941 try:
942 undovfs.unlink(undofile)
943 except OSError as e:
944 if e.errno != errno.ENOENT:
945 msg = _(b'error removing %s: %s\n')
946 path = undovfs.join(undofile)
947 e_msg = stringutil.forcebytestr(e)
948 msg %= (path, e_msg)
949 dest_repo.ui.warn(msg)
935 repair.cleanup_undo_files(dest_repo)
General Comments 0
You need to be logged in to leave comments. Login now