pulkit created this revision. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6241 AFFECTED FILES hgext/narrow/narrowbundle2.py mercurial/exchange.py CHANGE DETAILS diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -2214,14 +2214,8 @@ if (kwargs.get(r'narrow', False) and kwargs.get(r'narrow_acl', False) and (include or exclude)): narrowspecpart = bundler.newpart('narrow:spec') - data = '' - if include: - data += '\n'.join(include) - data += '\0' - if exclude: - data += '\n'.join(exclude) - - narrowspecpart.data = data + narrowspecpart.data = '%s\0%s' % ('\n'.join(include), + '\n'.join(exclude)) @getbundle2partsgenerator('bookmarks') def _getbundlebookmarkpart(bundler, repo, source, bundlecaps=None, diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -149,10 +149,8 @@ # bundle2 parameters instead. if data: inc, exc = data.split('\0') - if inc: - includepats |= set(inc.splitlines()) - if exc: - excludepats |= set(exc.splitlines()) + includepats |= set(inc.splitlines()) + excludepats |= set(exc.splitlines()) narrowspec.validatepatterns(includepats) narrowspec.validatepatterns(excludepats) To: pulkit, durin42, martinvonz, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel