This is an archive of the discontinued Mercurial Phabricator instance.

narrow: only send includepats and excludepats if they are not empty
ClosedPublic

Authored by pulkit on Oct 17 2018, 10:53 AM.

Details

Summary

If we send an empty includepats or excludepats argument to getbundle, it's
translated to [''] on the server which causes problems because even though
it's empty, bool of that value if True and we end up creating differencematcher
with narrowspec.match() which results in unexpected behavior.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Oct 17 2018, 10:53 AM
pulkit updated this revision to Diff 12232.Oct 18 2018, 6:38 AM
This revision was automatically updated to reflect the committed changes.

I noticed I had an unsubmitted comment on this patch. Can be done in a follow-up (if at all).

hgext/narrow/narrowcommands.py
142–144

should these also be changed?

pulkit added inline comments.Nov 12 2018, 1:52 PM
hgext/narrow/narrowcommands.py
142–144

From these, do you mean the oldincludepats and oldexcludepats?