Path conflicts that occur during merges are represented by 'pu' (unresolved)
and 'pr' (resolved) records in the merge state. These are stored on disk
in 'P' records.
Details
- Reviewers
ryanmce - Group Reviewers
hg-reviewers - Commits
- rHG1913162854f2: merge: add pathconflict merge state
rHG2459427e7f57: merge: add pathconflict merge state
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Logic looks good to me. Just a couple of inline nits about comments to improve understanding that I think would be useful.
mercurial/merge.py | ||
---|---|---|
84–87 | I think it's worth mentioning why these need to be separate states (eg, so you can round-trip from resolved path conflict to unresolved path conflict) | |
88 | Thanks for adding this! | |
364–365 | Even though there's not a lot of good comments here, now, could you add some when you modify this? Something like "if the state includes a path conflict (pu or pr), include a Path (P) record which ...." (I don't know what to write here -- why don't we need to distinguish between pu and pr in the record? A reader should not have to figure this out on their own, ideally. | |
434 | Maybe this should be called addpathconflict? |
mercurial/merge.py | ||
---|---|---|
434 | I named it addpath for symmetry with add. The merge state stores conflicts, so it seems superfluous to have it in the name. |
mercurial/merge.py | ||
---|---|---|
88 | Some of this is adding documentation for existing functionality? It could be nice to have this changeset show exactly what it is adding. |
mercurial/merge.py | ||
---|---|---|
364–365 | This could use some improvement in general, so I'll write some comments on how this function works as a follow-up patch. |
I think it's worth mentioning why these need to be separate states (eg, so you can round-trip from resolved path conflict to unresolved path conflict)