Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | hgext/histedit.py (4 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
The set of node to strip may contains unknown nodes.""" | The set of node to strip may contains unknown nodes.""" | ||||
with repo.lock(): | with repo.lock(): | ||||
# do not let filtering get in the way of the cleanse | # do not let filtering get in the way of the cleanse | ||||
# we should probably get rid of obsolescence marker created during the | # we should probably get rid of obsolescence marker created during the | ||||
# histedit, but we currently do not have such information. | # histedit, but we currently do not have such information. | ||||
repo = repo.unfiltered() | repo = repo.unfiltered() | ||||
# Find all nodes that need to be stripped | # Find all nodes that need to be stripped | ||||
# (we use %lr instead of %ln to silently ignore unknown items) | # (we use %lr instead of %ln to silently ignore unknown items) | ||||
nm = repo.changelog.nodemap | has_node = repo.changelog.index.has_node | ||||
nodes = sorted(n for n in nodes if n in nm) | nodes = sorted(n for n in nodes if has_node(n)) | ||||
roots = [c.node() for c in repo.set(b"roots(%ln)", nodes)] | roots = [c.node() for c in repo.set(b"roots(%ln)", nodes)] | ||||
if roots: | if roots: | ||||
backup = not nobackup | backup = not nobackup | ||||
repair.strip(ui, repo, roots, backup=backup) | repair.strip(ui, repo, roots, backup=backup) | ||||
def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs): | def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs): | ||||
if isinstance(nodelist, str): | if isinstance(nodelist, str): |