sapling/tests/test-treemanifest-amend.t
Jun Wu c0553c8b2d treemanifest: add a test demonstrating histpack crash during amend
Summary:
As demonstrated by the added test. Traceback looks like:

  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 734, in __exit__
    self.close()
  File "/usr/lib/python2.7/site-packages/mercurial/transaction.py", line 40, in _active
    return func(self, *args, **kwds)
  File "/usr/lib/python2.7/site-packages/mercurial/transaction.py", line 468, in close
    self._finalizecallback[cat](self)
  File "/usr/lib/python2.7/site-packages/mercurial/localrepo.py", line 1371, in commitnotransaction
    self.manifestlog.commitpending()
  File "/usr/lib/python2.7/site-packages/hgext/treemanifest/__init__.py", line 681, in commitpending
    hpack.close()
  File "/usr/lib/python2.7/site-packages/hgext/remotefilelog/historypack.py", line 532, in close
    self._write()
  File "/usr/lib/python2.7/site-packages/hgext/remotefilelog/historypack.py", line 513, in _write
    raise ValueError("attempting to add nullid linknode")

Reviewed By: DurhamG

Differential Revision: D8363934

fbshipit-source-id: ea84aa085b37541bce9a5e643a61cf17ae33e0b4
2018-06-11 18:08:31 -07:00

19 lines
524 B
Perl

Crash in histpack code path where the amend destination already exists
$ enable undo inhibit treemanifest fastmanifest remotefilelog
$ setconfig experimental.evolution=createmarkers treemanifest.treeonly=1 remotefilelog.reponame=foo remotefilelog.cachepath=$TESTTMP/cache
$ newrepo
$ drawdag << 'EOS'
> B
> |
> A
> EOS
$ enable undo
$ hg up -q $B
$ echo foo > msg
$ hg commit --amend -l msg
$ hg undo -q
$ hg commit --amend -l msg 2>&1 | tail -1
ValueError: attempting to add nullid linknode