Show More
@@ -160,6 +160,7 b' import errno' | |||||
160 | import os |
|
160 | import os | |
161 | import sys |
|
161 | import sys | |
162 |
|
162 | |||
|
163 | from mercurial import bundle2 | |||
163 | from mercurial import cmdutil |
|
164 | from mercurial import cmdutil | |
164 | from mercurial import discovery |
|
165 | from mercurial import discovery | |
165 | from mercurial import error |
|
166 | from mercurial import error | |
@@ -822,7 +823,18 b' def _histedit(ui, repo, state, *freeargs' | |||||
822 | backupfile = repo.join(state.backupfile) |
|
823 | backupfile = repo.join(state.backupfile) | |
823 | f = hg.openpath(ui, backupfile) |
|
824 | f = hg.openpath(ui, backupfile) | |
824 | gen = exchange.readbundle(ui, f, backupfile) |
|
825 | gen = exchange.readbundle(ui, f, backupfile) | |
825 | gen.apply(repo, 'histedit', 'bundle:' + backupfile) |
|
826 | tr = repo.transaction('histedit.abort') | |
|
827 | try: | |||
|
828 | if not isinstance(gen, bundle2.unbundle20): | |||
|
829 | gen.apply(repo, 'histedit', 'bundle:' + backupfile) | |||
|
830 | if isinstance(gen, bundle2.unbundle20): | |||
|
831 | bundle2.applybundle(repo, gen, tr, | |||
|
832 | source='histedit', | |||
|
833 | url='bundle:' + backupfile) | |||
|
834 | tr.close() | |||
|
835 | finally: | |||
|
836 | tr.release() | |||
|
837 | ||||
826 | os.remove(backupfile) |
|
838 | os.remove(backupfile) | |
827 |
|
839 | |||
828 | # check whether we should update away |
|
840 | # check whether we should update away |
General Comments 0
You need to be logged in to leave comments.
Login now