D4383: narrow: add server logic to send cg while widening without ellipsis

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Aug 29 19:35:49 EDT 2018


martinvonz accepted this revision.
martinvonz added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> pulkit wrote in narrowbundle2.py:319
> I tried that but test-narrow-acl.t fails. Also, this is the error trying to prevent which I added the `widen` kwarg to make sure clone operations does not go through that.
> 
> But, clones with narrowhgacl set will go through this code path.
> 
> I looked into fixing this traceback in past but was unable to fix it. Any pointer will be appreciated.
> 
>   --- /storage/pulkit/hg-committed/tests/test-narrow-acl.t
>   +++ /storage/pulkit/hg-committed/tests/test-narrow-acl.t.err
>   @@ -22,21 +22,98 @@
>      adding changesets
>      adding manifests
>      adding file changes
>   -  added 3 changesets with 2 changes to 2 files
>   -  new changesets * (glob)
>   -  updating to branch default
>   -  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
>   +  added 0 changesets with 0 changes to 0 files
>   +  transaction abort!
>   +  rollback completed
>   +  Traceback (most recent call last):
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/scmutil.py", line 164, in callcatch
>   +      return func()
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/dispatch.py", line 350, in _runcatchfunc
>   +      return _dispatch(req)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/dispatch.py", line 987, in _dispatch
>   +      cmdpats, cmdoptions)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/dispatch.py", line 733, in runcommand
>   +      ret = _runcommand(ui, options, cmd, d)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/dispatch.py", line 995, in _runcommand
>   +      return cmdfunc()
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/dispatch.py", line 984, in <lambda>
>   +      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/util.py", line 1532, in check
>   +      return func(*args, **kwargs)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/util.py", line 1532, in check
>   +      return func(*args, **kwargs)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/hgext/narrow/narrowcommands.py", line 137, in clonenarrowcmd
>   +      return orig(ui, repo, *args, **pycompat.strkwargs(opts))
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/util.py", line 1532, in check
>   +      return func(*args, **kwargs)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/commands.py", line 1475, in clone
>   +      shareopts=opts.get('shareopts'))
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/hg.py", line 710, in clone
>   +      streamclonerequested=stream)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/hgext/narrow/narrowcommands.py", line 132, in pullnarrow
>   +      return orig(repo, *args, **kwargs)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/exchange.py", line 1494, in pull
>   +      _fullpullbundle2(repo, pullop)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/exchange.py", line 1434, in _fullpullbundle2
>   +      _pullbundle2(pullop)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/exchange.py", line 1677, in _pullbundle2
>   +      bundle2.processbundle(pullop.repo, bundle, op=op)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/bundle2.py", line 460, in processbundle
>   +      processparts(repo, op, unbundler)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/bundle2.py", line 467, in processparts
>   +      _processpart(op, part)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/bundle2.py", line 534, in _processpart
>   +      handler(op, part)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/bundle2.py", line 2138, in handlephases
>   +      phases.updatephases(op.repo.unfiltered(), op.gettransaction, headsbyphase)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/phases.py", line 603, in updatephases
>   +      heads = [c.node() for c in repo.set(revset, headsbyphase[phase])]
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/localrepo.py", line 916, in set
>   +      for r in self.revs(expr, *args):
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/localrepo.py", line 905, in revs
>   +      return m(self)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/revset.py", line 2273, in mfunc
>   +      return getset(repo, subset, tree, order)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/revset.py", line 102, in getset
>   +      return methods[x[0]](repo, subset, *x[1:], order=order)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/revset.py", line 194, in differenceset
>   +      return getset(repo, subset, x, order) - getset(repo, subset, y, anyorder)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/revset.py", line 102, in getset
>   +      return methods[x[0]](repo, subset, *x[1:], order=order)
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/revset.py", line 122, in stringset
>   +      x = scmutil.intrev(scmutil.revsymbol(repo, x))
>   +    File "/place/vartmp/hgtests.Hyf1ig/install/lib/python/mercurial/scmutil.py", line 618, in revsymbol
>   +      raise error.RepoLookupError(_("unknown revision '%s'") % symbol)
>   +  RepoLookupError: unknown revision 'e74ca1f005ce671b1e03fd521eac2efb63d49b87'
>   +  abort: unknown revision 'e74ca1f005ce671b1e03fd521eac2efb63d49b87'!
>   +  [255]

Yeah, that does seem harder than I had hoped :( I don't see much harm in adding the `widen` argument to the protocol, so let's just do it as you have done it here for now.  It's probably pretty easy to create a separate wire protocol *command* for it later.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4383

To: pulkit, durin42, #hg-reviewers, martinvonz
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list