This is different from the update() function that I just made
private. The new function is specifically for the normal hg update
use case. It doesn't do a merge and it doesn't do a clean (forced)
update.
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHGc1b603cdc95a: merge: add a higher-level update() for the common `hg update` use case
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
mercurial/merge.py | ||
---|---|---|
2060 | Let's add couple of lines of documentation here that if you are looking for old merge.update(), merge._update() is the thing you are looking for. |
mercurial/merge.py | ||
---|---|---|
2060 | Makes sense. Done. |
[Moving a discussion we are having on #hg-evolve here to reach more people]
The clarification of interface seems great overall. However I am a bit
worried about the drop of the initial repo argument to these function.
Passing the repository explicitly seems safer to me. It make sure we are
updating the right repository, and more importantly with the right
repoview (filtering level). It would be easy for some fault code to
reuse output from a function using relaxed filtering to use in a more
filtered context. explicitly passing the repository catch that.
What do you think ?
I can see the concern at some abstract level, but I don't know what you mean more concretely. What would such bad callers look like? Also, does your concern apply to most places we pass around context objects?
Let's add couple of lines of documentation here that if you are looking for old merge.update(), merge._update() is the thing you are looking for.