mercurial/commands.py
changeset 41365 876494fd967d
parent 41281 183df3df6031
child 41367 b44f1703b28c
equal deleted inserted replaced
41364:0132221c25cd 41365:876494fd967d
  2631         # and old graft state which does not have all the data required to abort
  2631         # and old graft state which does not have all the data required to abort
  2632         # the graft
  2632         # the graft
  2633         raise error.Abort(_("cannot abort using an old graftstate"))
  2633         raise error.Abort(_("cannot abort using an old graftstate"))
  2634 
  2634 
  2635     # changeset from which graft operation was started
  2635     # changeset from which graft operation was started
  2636     startctx = None
       
  2637     if len(newnodes) > 0:
  2636     if len(newnodes) > 0:
  2638         startctx = repo[newnodes[0]].p1()
  2637         startctx = repo[newnodes[0]].p1()
  2639     else:
  2638     else:
  2640         startctx = repo['.']
  2639         startctx = repo['.']
  2641     # whether to strip or not
  2640     # whether to strip or not
  5501     ctx = repo[None]
  5500     ctx = repo[None]
  5502     parents = ctx.parents()
  5501     parents = ctx.parents()
  5503     pnode = parents[0].node()
  5502     pnode = parents[0].node()
  5504     marks = []
  5503     marks = []
  5505 
  5504 
  5506     ms = None
       
  5507     try:
  5505     try:
  5508         ms = mergemod.mergestate.read(repo)
  5506         ms = mergemod.mergestate.read(repo)
  5509     except error.UnsupportedMergeRecords as e:
  5507     except error.UnsupportedMergeRecords as e:
  5510         s = ' '.join(e.recordtypes)
  5508         s = ' '.join(e.recordtypes)
  5511         ui.warn(
  5509         ui.warn(
  5906 
  5904 
  5907     opts = pycompat.byteskwargs(opts)
  5905     opts = pycompat.byteskwargs(opts)
  5908     ui.pager('tags')
  5906     ui.pager('tags')
  5909     fm = ui.formatter('tags', opts)
  5907     fm = ui.formatter('tags', opts)
  5910     hexfunc = fm.hexfunc
  5908     hexfunc = fm.hexfunc
  5911     tagtype = ""
       
  5912 
  5909 
  5913     for t, n in reversed(repo.tagslist()):
  5910     for t, n in reversed(repo.tagslist()):
  5914         hn = hexfunc(n)
  5911         hn = hexfunc(n)
  5915         label = 'tags.normal'
  5912         label = 'tags.normal'
  5916         tagtype = ''
  5913         tagtype = ''