hgext/histedit.py
changeset 43548 ccda03f6abcb
parent 43547 2b5d07702f94
child 43568 418ca164d44c
equal deleted inserted replaced
43547:2b5d07702f94 43548:ccda03f6abcb
  2563         # we should probably get rid of obsolescence marker created during the
  2563         # we should probably get rid of obsolescence marker created during the
  2564         # histedit, but we currently do not have such information.
  2564         # histedit, but we currently do not have such information.
  2565         repo = repo.unfiltered()
  2565         repo = repo.unfiltered()
  2566         # Find all nodes that need to be stripped
  2566         # Find all nodes that need to be stripped
  2567         # (we use %lr instead of %ln to silently ignore unknown items)
  2567         # (we use %lr instead of %ln to silently ignore unknown items)
  2568         nm = repo.changelog.nodemap
  2568         has_node = repo.changelog.index.has_node
  2569         nodes = sorted(n for n in nodes if n in nm)
  2569         nodes = sorted(n for n in nodes if has_node(n))
  2570         roots = [c.node() for c in repo.set(b"roots(%ln)", nodes)]
  2570         roots = [c.node() for c in repo.set(b"roots(%ln)", nodes)]
  2571         if roots:
  2571         if roots:
  2572             backup = not nobackup
  2572             backup = not nobackup
  2573             repair.strip(ui, repo, roots, backup=backup)
  2573             repair.strip(ui, repo, roots, backup=backup)
  2574 
  2574