Bug ID: 5801
           Summary: pure-python manifest code produces corrupt unsorted
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial

The only steps to reproduce I have right now involve a repo from timeless
that's a conversion of hg-git, but I can reliably build a corrupt commit with a
merge of two revisions if I use HGMODULEPOLICY=py. If I use HGMODULEPOLICY=c,
the problem doesn't happen.

This does appear to be rare, and the resulting manifest can't even be checked
out so it's obvious *right away* something is borked, but we should still
address this promptly, probably with backports to older versions...

Here's the traceback:

Traceback (most recent call last):
  File "/opt/hg/bin/hg", line 41, in <module>
  File "/opt/hg/lib/python/mercurial/", line 88, in run
    status = (dispatch(req) or 0) & 255
  File "/opt/hg/lib/python/mercurial/", line 183, in dispatch
    ret = _runcatch(req)
  File "/opt/hg/lib/python/mercurial/", line 324, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/opt/hg/lib/python/mercurial/", line 332, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/opt/hg/lib/python/mercurial/", line 154, in callcatch
    return func()
  File "/opt/hg/lib/python/mercurial/", line 314, in _runcatchfunc
    return _dispatch(req)
  File "/opt/hg/lib/python/mercurial/", line 917, in _dispatch
    cmdpats, cmdoptions)
  File "/opt/hg/lib/python/mercurial/", line 674, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/opt/hg/lib/python/mercurial/", line 925, in _runcommand
    return cmdfunc()
  File "/opt/hg/lib/python/mercurial/", line 914, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/opt/hg/lib/python/mercurial/", line 1228, in check
    return func(*args, **kwargs)
  File "/opt/hg/lib/python/mercurial/", line 1228, in check
    return func(*args, **kwargs)
  File "/opt/hg/lib/python/hgext/", line 3590, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/opt/hg/lib/python/mercurial/", line 1228, in check
    return func(*args, **kwargs)
  File "/opt/hg/lib/python/mercurial/", line 1963, in export
    opts=patch.diffallopts(ui, opts))
  File "/opt/hg/lib/python/mercurial/", line 1555, in export
    repo, ctx, match, switch_parent, rev, seqno, write, opts)
  File "/opt/hg/lib/python/mercurial/", line 1499, in _exportsingle
    for chunk, label in patch.diffui(repo, prev, node, match, opts=diffopts):
  File "/opt/hg/lib/python/mercurial/", line 2486, in difflabel
    for chunk in func(*args, **kw):
  File "/opt/hg/lib/python/mercurial/", line 2339, in diff
    losedatafn=losedatafn, prefix=prefix, relroot=relroot, copy=copy,
  File "/opt/hg/lib/python/mercurial/", line 2396, in diffhunks
    changes = repo.status(ctx1, ctx2, match=match)
  File "/opt/hg/lib/python/mercurial/", line 2055, in status
  File "/opt/hg/lib/python/mercurial/", line 362, in status
  File "/opt/hg/lib/python/mercurial/", line 131, in _buildstatus
    mf2 = self._buildstatusmanifest(s)
  File "/opt/hg/lib/python/mercurial/", line 109, in
    return self.manifest()
  File "/opt/hg/lib/python/mercurial/", line 189, in manifest
    return self._manifest
  File "/opt/hg/lib/python/mercurial/", line 966, in __get__
    result = self.func(obj)
  File "/opt/hg/lib/python/mercurial/", line 547, in _manifest
  File "/opt/hg/lib/python/mercurial/", line 1471, in read
    self._data = manifestdict(text)
  File "/opt/hg/lib/python/mercurial/", line 423, in __init__
    self._lm = _lazymanifest(data)
ValueError: Manifest lines not in sorted order.

(from running `hg export` on a thusly corrupt revision)

You are receiving this mail because:
You are on the CC list for the bug.
Mercurial-devel mailing list

Reply via email to