The old code stores successors of all related nodes together, which works
fine if destination is unique. A future patch would make destination
non-unique so let's change the implementation to test successors for
rebaseset separately.
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGba9d5d48bf95: rebase: rewrite _computeobsoletenotrebased
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.
Event Timeline
hgext/rebase.py | ||
---|---|---|
1494 | Oh, allsuccessors() includes "srcnode" in the output! It took me a while to figure that out. A comment would help. How about something like this? successors = list(obsutil.allsuccessors(repo.obsstore, [srcnode])) successors = successors[1:] # allsuccessors() includes the start nodes if not successors: # prune ... |
hgext/rebase.py | ||
---|---|---|
1494 | That copies the list therefore slightly less performant. I'll add a comment. |
hgext/rebase.py | ||
---|---|---|
1495 | "returns node itself if it finds obsmarkers" is technically correct, but but also returns it if there are no obsmarkers :-) However, "When the list only contains one element, it means there is at least one obsmarker with srcnode as predecessor" is not correct; it does not mean that there is at least one obsmarker, it means that there are no successors. Or did I misunderstand either the text or what allsuccessors() does? I'll rephrase it in flight unless you tell me soon that I misunderstood. |
Oh, allsuccessors() includes "srcnode" in the output! It took me a while to figure that out. A comment would help.
How about something like this?