hgext/histedit.py
changeset 33055 18c2489ac96d
parent 33051 b82615afde65
child 33345 4192694b4844
equal deleted inserted replaced
33054:dbc2ee17053e 33055:18c2489ac96d
  1196         if not state.topmost in repo and state.backupfile:
  1196         if not state.topmost in repo and state.backupfile:
  1197             backupfile = repo.vfs.join(state.backupfile)
  1197             backupfile = repo.vfs.join(state.backupfile)
  1198             f = hg.openpath(ui, backupfile)
  1198             f = hg.openpath(ui, backupfile)
  1199             gen = exchange.readbundle(ui, f, backupfile)
  1199             gen = exchange.readbundle(ui, f, backupfile)
  1200             with repo.transaction('histedit.abort') as tr:
  1200             with repo.transaction('histedit.abort') as tr:
  1201                 if not isinstance(gen, bundle2.unbundle20):
  1201                 bundle2.applybundle(repo, gen, tr, source='histedit',
  1202                     bundle2.applybundle1(repo, gen, tr,
  1202                                     url='bundle:' + backupfile)
  1203                                          source='histedit',
       
  1204                                          url='bundle:' + backupfile)
       
  1205                 else:
       
  1206                     bundle2.applybundle(repo, gen, tr,
       
  1207                                         source='histedit',
       
  1208                                         url='bundle:' + backupfile)
       
  1209 
  1203 
  1210             os.remove(backupfile)
  1204             os.remove(backupfile)
  1211 
  1205 
  1212         # check whether we should update away
  1206         # check whether we should update away
  1213         if repo.unfiltered().revs('parents() and (%n  or %ln::)',
  1207         if repo.unfiltered().revs('parents() and (%n  or %ln::)',