Details
Details
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.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/narrow/narrowbundle2.py (7 lines) | |||
| M | hgext/narrow/narrowwirepeer.py (1 line) |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz |
| repo, | repo, | ||||
| oldinclude, | oldinclude, | ||||
| oldexclude, | oldexclude, | ||||
| newinclude, | newinclude, | ||||
| newexclude, | newexclude, | ||||
| version, | version, | ||||
| common, | common, | ||||
| known, | known, | ||||
| depth, | |||||
| ): | ): | ||||
| newmatch = narrowspec.match( | newmatch = narrowspec.match( | ||||
| repo.root, include=newinclude, exclude=newexclude | repo.root, include=newinclude, exclude=newexclude | ||||
| ) | ) | ||||
| if depth is not None: | |||||
| depth = int(depth) | |||||
| if depth < 1: | |||||
| raise error.Abort(_(b'depth must be positive, got %d') % depth) | |||||
| common = set(common or [nullid]) | common = set(common or [nullid]) | ||||
| # Steps: | # Steps: | ||||
| # 1. Send kill for "$known & ::common" | # 1. Send kill for "$known & ::common" | ||||
| # | # | ||||
| # 2. Send changegroup for ::common | # 2. Send changegroup for ::common | ||||
| # | # | ||||
| # 3. Proceed. | # 3. Proceed. | ||||
| repo, set(), common, known, newmatch | repo, set(), common, known, newmatch | ||||
| ) | ) | ||||
| if newvisit: | if newvisit: | ||||
| packer = changegroup.getbundler( | packer = changegroup.getbundler( | ||||
| version, | version, | ||||
| repo, | repo, | ||||
| matcher=newmatch, | matcher=newmatch, | ||||
| ellipses=True, | ellipses=True, | ||||
| shallow=depth is not None, | shallow=False, | ||||
| ellipsisroots=newellipsis, | ellipsisroots=newellipsis, | ||||
| fullnodes=newfull, | fullnodes=newfull, | ||||
| ) | ) | ||||
| cgdata = packer.generate(common, newvisit, False, b'narrow_widen') | cgdata = packer.generate(common, newvisit, False, b'narrow_widen') | ||||
| part = bundler.newpart(b'changegroup', data=cgdata) | part = bundler.newpart(b'changegroup', data=cgdata) | ||||
| part.addparam(b'version', version) | part.addparam(b'version', version) | ||||
| if b'treemanifest' in repo.requirements: | if b'treemanifest' in repo.requirements: | ||||
| repo, | repo, | ||||
| oldincludes, | oldincludes, | ||||
| oldexcludes, | oldexcludes, | ||||
| newincludes, | newincludes, | ||||
| newexcludes, | newexcludes, | ||||
| cgversion, | cgversion, | ||||
| common, | common, | ||||
| known, | known, | ||||
| None, | |||||
| ) | ) | ||||
| except error.Abort as exc: | except error.Abort as exc: | ||||
| bundler = bundle2.bundle20(repo.ui) | bundler = bundle2.bundle20(repo.ui) | ||||
| manargs = [(b'message', pycompat.bytestr(exc))] | manargs = [(b'message', pycompat.bytestr(exc))] | ||||
| advargs = [] | advargs = [] | ||||
| if exc.hint is not None: | if exc.hint is not None: | ||||
| advargs.append((b'hint', exc.hint)) | advargs.append((b'hint', exc.hint)) | ||||
| bundler.addpart(bundle2.bundlepart(b'error:abort', manargs, advargs)) | bundler.addpart(bundle2.bundlepart(b'error:abort', manargs, advargs)) | ||||