Extensions inspect the source parameter and add some custom logic on the basis
of value of that parameter. The parameter is also passed to hooks. So let's pass
the value as 'narrow_widen' to differentiate widening from pull.
Details
Details
- Reviewers
durin42 martinvonz - Group Reviewers
hg-reviewers - Commits
- rHGfa2395659828: narrow: pass 'narrow_widen' as source while generating changegroup
Diff Detail
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
Comment Actions
Although this is called as a part of exchange.pull(), we don't want other
extensions to wrap this pull call because it's not a normal pull and it's
widening.
I don't follow this. How does this prevent extensions from wrapping the pull? Do you mean that extensions that inspect the source parameter should not treat it like a normal pull? The source parameter also seems to be passed to hooks, btw (it probably makes sense to differentiate widening from pulling there too).
Comment Actions
Yes, I looked into the code where source parameter is used and it says the extension requires it. I think wrapping pull sounds to generic, I will improve the commit description. Thanks!