Mercurial > public > mercurial-scm > hg
comparison mercurial/streamclone.py @ 50286:3d0b5760851c stable
undo-files: move the undo cleanup code in the transaction module
Now that undo creation is gathered in the transaction module, let us move the code cleaning them up there too.
This will be useful to better clean previous undo files up before creating new
ones.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 06 Mar 2023 21:03:45 +0100 |
parents | 97e91001a4e0 |
children | d89eecf9605e |
comparison
equal
deleted
inserted
replaced
50285:473103758373 | 50286:3d0b5760851c |
---|---|
18 cacheutil, | 18 cacheutil, |
19 error, | 19 error, |
20 narrowspec, | 20 narrowspec, |
21 phases, | 21 phases, |
22 pycompat, | 22 pycompat, |
23 repair, | |
24 requirements as requirementsmod, | 23 requirements as requirementsmod, |
25 scmutil, | 24 scmutil, |
26 store, | 25 store, |
26 transaction, | |
27 util, | 27 util, |
28 ) | 28 ) |
29 from .revlogutils import ( | 29 from .revlogutils import ( |
30 nodemap, | 30 nodemap, |
31 ) | 31 ) |
930 | 930 |
931 with dest_repo.transaction(b"localclone") as tr: | 931 with dest_repo.transaction(b"localclone") as tr: |
932 dest_repo.store.write(tr) | 932 dest_repo.store.write(tr) |
933 | 933 |
934 # clean up transaction file as they do not make sense | 934 # clean up transaction file as they do not make sense |
935 repair.cleanup_undo_files(dest_repo) | 935 transaction.cleanup_undo_files(dest_repo) |