D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

navaneeth.suresh (Navaneeth Suresh) phabricator at mercurial-scm.org
Tue Aug 20 09:30:28 EDT 2019


navaneeth.suresh added inline comments.
navaneeth.suresh marked an inline comment as done.

INLINE COMMENTS

> pulkit wrote in exchange.py:1044
> If the node is None, then `if node and ....` will be false and the second condition won't be executed.

I'm getting the following error with the code snippet that you've suggested:

  +  Traceback (most recent call last):
  +    File "/tmp/hgtests.nS3TJv/install/bin/hg", line 43, in <module>
  +      dispatch.run()
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 99, in run
  +      status = dispatch(req)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 225, in dispatch
  +      ret = _runcatch(req) or 0
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 376, in _runcatch
  +      return _callcatch(ui, _runcatchfunc)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 384, in _callcatch
  +      return scmutil.callcatch(ui, func)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/scmutil.py", line 167, in callcatch
  +      return func()
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 367, in _runcatchfunc
  +      return _dispatch(req)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 1021, in _dispatch
  +      cmdpats, cmdoptions)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 756, in runcommand
  +      ret = _runcommand(ui, options, cmd, d)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 1030, in _runcommand
  +      return cmdfunc()
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", line 1018, in <lambda>
  +      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/util.py", line 1682, in check
  +      return func(*args, **kwargs)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/commands.py", line 4666, in push
  +      opargs=opargs)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", line 568, in push
  +      _pushbundle2(pushop)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", line 1149, in _pushbundle2
  +      ret = partgen(pushop, bundler)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", line 1025, in _pushb2bookmarks
  +      return _pushb2bookmarkspart(pushop, bundler)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", line 1052, in _pushb2bookmarkspart
  +      _abortonsecretctx(pushop, new, book)
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", line 1039, in _abortonsecretctx
  +      ctx = pushop.repo[node]
  +    File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/localrepo.py", line 1430, in __getitem__
  +      (changeid, type(changeid)))
  +  mercurial.error.ProgrammingError: unsupported changeid '' of type <type 'str'>
     [1]

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6731/new/

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

To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel


More information about the Mercurial-devel mailing list