equal
deleted
inserted
replaced
1169 ui.debug('restore wc to old parent %s\n' |
1169 ui.debug('restore wc to old parent %s\n' |
1170 % node.short(state.topmost)) |
1170 % node.short(state.topmost)) |
1171 |
1171 |
1172 # Recover our old commits if necessary |
1172 # Recover our old commits if necessary |
1173 if not state.topmost in repo and state.backupfile: |
1173 if not state.topmost in repo and state.backupfile: |
1174 backupfile = repo.join(state.backupfile) |
1174 backupfile = repo.vfs.join(state.backupfile) |
1175 f = hg.openpath(ui, backupfile) |
1175 f = hg.openpath(ui, backupfile) |
1176 gen = exchange.readbundle(ui, f, backupfile) |
1176 gen = exchange.readbundle(ui, f, backupfile) |
1177 with repo.transaction('histedit.abort') as tr: |
1177 with repo.transaction('histedit.abort') as tr: |
1178 if not isinstance(gen, bundle2.unbundle20): |
1178 if not isinstance(gen, bundle2.unbundle20): |
1179 gen.apply(repo, 'histedit', 'bundle:' + backupfile) |
1179 gen.apply(repo, 'histedit', 'bundle:' + backupfile) |
1355 repopath=repo.path) |
1355 repopath=repo.path) |
1356 |
1356 |
1357 # Save edit rules in .hg/histedit-last-edit.txt in case |
1357 # Save edit rules in .hg/histedit-last-edit.txt in case |
1358 # the user needs to ask for help after something |
1358 # the user needs to ask for help after something |
1359 # surprising happens. |
1359 # surprising happens. |
1360 f = open(repo.join('histedit-last-edit.txt'), 'w') |
1360 f = open(repo.vfs.join('histedit-last-edit.txt'), 'w') |
1361 f.write(rules) |
1361 f.write(rules) |
1362 f.close() |
1362 f.close() |
1363 |
1363 |
1364 return rules |
1364 return rules |
1365 |
1365 |
1596 return orig(ui, repo, nodelist, *args, **kwargs) |
1596 return orig(ui, repo, nodelist, *args, **kwargs) |
1597 |
1597 |
1598 extensions.wrapfunction(repair, 'strip', stripwrapper) |
1598 extensions.wrapfunction(repair, 'strip', stripwrapper) |
1599 |
1599 |
1600 def summaryhook(ui, repo): |
1600 def summaryhook(ui, repo): |
1601 if not os.path.exists(repo.join('histedit-state')): |
1601 if not os.path.exists(repo.vfs.join('histedit-state')): |
1602 return |
1602 return |
1603 state = histeditstate(repo) |
1603 state = histeditstate(repo) |
1604 state.read() |
1604 state.read() |
1605 if state.actions: |
1605 if state.actions: |
1606 # i18n: column positioning for "hg summary" |
1606 # i18n: column positioning for "hg summary" |