This bug is as old as histedit, which is more than 10 years! I'm a
little sad about the extra calculations here that we're just going to
throw out, but I don't see any better way to look for untracked file
conflicts and I want the bug fixed.
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG699102b10530: histedit: sniff-test for untracked file conflicts before prompting for rules
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/histedit.py | ||
---|---|---|
1974–1993 | Would it be enough to check if any untracked file is in any of those commits? That should be a lot simpler and cheaper. |
hgext/histedit.py | ||
---|---|---|
1974–1993 | Maybe? The tricky bit would be if the user has a gazillion untracked or ignored files, since both of those can come into play. |
hgext/histedit.py | ||
---|---|---|
1974–1993 | Won't they (correctly) cause a conflict with your approach too? |
hgext/histedit.py | ||
---|---|---|
1974–1993 | They'll correctly cause a conflict, but I trust the merge code to efficiently figure out what paths to look up, rather than (eg) enumerating a large build/ hierarchy that's wholly ignored. |
hgext/histedit.py | ||
---|---|---|
1974–1993 | Ah, now I see what you mean. There are also config options for merge.checkunknown, merge.checkignored, and experimental.merge.checkpathconflicts (and maybe others) that my proposal would miss. So I agree with doing it the way you have. | |
1989 | could you pass these as keyword arguments? |
hgext/histedit.py | ||
---|---|---|
1989 | Maybe, but I'll do what happens at the other callsite. I also cleaned up the TODO, as I figured it out with print-debugging. |
hgext/histedit.py | ||
---|---|---|
1975–1978 | No, because that gives me the workingctx, and I need p1 of the workingctx. Again, I figured that out by printf debugging powers, it wasn't what I would have guessed (I actually expected [c] to be the right argument to calculateupdates - but the check didn't do what I needed until I was getting p1 of the workingctx like this. Sigh.) | |
1987–1988 | Agreed. I'm just not wanting to provide a warranty that this makes sense in the future, thus the hedging. |
hgext/histedit.py | ||
---|---|---|
1975–1978 | Oh, I confused calculateupdates() arguments with update() -- calculateupdates() does not calculate a default ancestor, so you have to pass it in as you do here. |
Does None (the default value for that argument) work? It seems like it should. If it does, then that seems preferable.