[Bug 4701] New: bundle2 assumes listkeys support, ends up with bookmarks=None
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Tue Jun 2 01:55:07 UTC 2015
http://bz.selenic.com/show_bug.cgi?id=4701
Priority: normal
Bug ID: 4701
CC: mercurial-devel at selenic.com,
pierre-yves.david at ens-lyon.org
Assignee: bugzilla at selenic.com
Summary: bundle2 assumes listkeys support, ends up with
bookmarks=None
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: hg at pewpew.net
Hardware: PC
Status: UNCONFIRMED
Version: default branch
Component: bundle2
Product: Mercurial
02defdb1b628 makes the assumption that the server supports listkeys in bundle2,
and that the server sent the bookmarks in the bundle2 response to getbundle. I
have a server that didn't (until just now) support listkeys, didn't advertise
it in the capabilities, and when cloning from this server I got error output
that looks like this:
../hg/hg clone --narrow --include google3/devtools/piper/hgfission
http://localhost:31338 hgf2
requesting all changes
adding changesets
adding manifests
adding file changes
added 64 changesets with 0 changes to 0 files
transaction abort!
rollback completed
** Unknown exception encountered with possibly-broken third-party extension
piper_changelog
** which supports versions unknown of Mercurial.
** Please disable piper_changelog and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2]
** Mercurial Distributed SCM (version 3.4.1+464-eb52de500d2a)
** Extensions loaded: color, evolve, multidiff, extdiff, histedit, patchbomb,
graphlog, progress, rebase, record, shelve, transplant, srcfsfilelog,
piper_changelog, narrowhg, readonly_symlink, crecord
Traceback (most recent call last):
File "../hg/hg", line 43, in <module>
mercurial.dispatch.run()
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
30, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
92, in dispatch
ret = _runcatch(req)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
162, in _runcatch
return _dispatch(req)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
894, in _dispatch
cmdpats, cmdoptions)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/extensions.py",
line 171, in closure
return func(*(args + a), **kw)
File
"/usr/local/google/home/spectral/src/hg/extensions/narrowhg/src/narrowcommands.py",
line 34, in runcommand_warning
cmdoptions)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
655, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/extensions.py",
line 171, in closure
return func(*(args + a), **kw)
File "/usr/local/google/home/spectral/src/hg/hg/hgext/color.py", line 525, in
colorcmd
return orig(ui_, opts, cmd, cmdfunc)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
1011, in _runcommand
return checkargs()
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
980, in checkargs
return cmdfunc()
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/dispatch.py", line
891, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/util.py", line 695,
in check
return func(*args, **kwargs)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/extensions.py",
line 171, in closure
return func(*(args + a), **kw)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/util.py", line 695,
in check
return func(*args, **kwargs)
File
"/usr/local/google/home/spectral/src/hg/extensions/narrowhg/src/narrowcommands.py",
line 81, in clonenarrowcmd
orig(ui, repo, *args, **opts)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/util.py", line 695,
in check
return func(*args, **kwargs)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/extensions.py",
line 171, in closure
return func(*(args + a), **kw)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/util.py", line 695,
in check
return func(*args, **kwargs)
File
"/usr/local/google/home/spectral/src/hg/extensions/srcfsfilelog/srcfsfilelog/__init__.py",
line 96, in cloneshallow
orig(ui, repo, *args, **opts)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/util.py", line 695,
in check
return func(*args, **kwargs)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/commands.py", line
1421, in clone
branch=opts.get('branch'))
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/hg.py", line 452,
in clone
destpeer.local().clone(srcpeer, heads=revs, stream=stream)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/extensions.py",
line 171, in closure
return func(*(args + a), **kw)
File
"/usr/local/google/home/spectral/src/hg/extensions/narrowhg/src/narrowcommands.py",
line 78, in clone_narrow
orig(self, *args, **kwargs)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/localrepo.py", line
1868, in clone
ret = exchange.pull(self, remote, heads).cgresult
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/exchange.py", line
906, in pull
_pullbookmarks(pullop)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/exchange.py", line
1130, in _pullbookmarks
explicit=pullop.explicitbookmarks)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/bookmarks.py", line
391, in updatefromremote
) = compare(repo, remotemarks, localmarks, dsthex=hex)
File "/usr/local/google/home/spectral/src/hg/hg/mercurial/bookmarks.py", line
312, in compare
srcmarkset = set(srcmarks)
TypeError: 'NoneType' object is not iterable
Looks like pullop.remotemarks is None if:
1: using bundle2
2: no bundle2 part named LISTKEYS w/ param namespace=bookmarks exists. It's OK
for the part to exist and be empty, it seems.
I imagine that if the client made a request with the bundlecaps listkeys=
parameter not requesting bookmarks that the server wouldn't emit them and that
this would also encounter the issue, but I haven't tested.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list