This will exist in two places with defered writes, so we want to avoid
duplication.
Details
- Reviewers
quark pulkit - Group Reviewers
hg-reviewers - Commits
- rHG24bf823377fc: merge: move cwd-missing detection to helper functions
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
Oops, I just found some old unsubmitted comments here. Sorry
mercurial/merge.py | ||
---|---|---|
1776–1778 | Now that we this is a function and "return" can be used to prevent execution of lines after it, maybe not negating the condition helps a little: if err.errno == errno.ENOENT: return None raise | |
1783 | I think it would be clearer to move at least the "if oldcwd" back to the caller. I think the entire function seems simple enough to be in the caller now _getcwd() has been extracted, actually. |
mercurial/merge.py | ||
---|---|---|
1772 | i think we usually put helpers close to (and before?) the functions that use them, not at the end of the file |
Now that we this is a function and "return" can be used to prevent execution of lines after it, maybe not negating the condition helps a little: