sapling/eden/hg-server/tests/test-treemanifest-amend.t
Durham Goode 98d9269874 server: copy hg to a new hg-server directory
Summary:
Create a fork of the Mercurial code that we can use to build server
rpms. The hg servers will continue to exist for a few more months while we move
the darkstorm and ediscovery use cases off them. In the mean time, we want to
start making breaking changes to the client, so let's create a stable copy of
the hg code to produce rpms for the hg servers.

The fork is based off c7770c78d, the latest hg release.

This copies the files as is, then adds some minor tweaks to get it to build:
- Disables some lint checks that appear to be bypassed by path
- sed replace eden/scm with eden/hg-server
- Removed a dependency on scm/telemetry from the edenfs-client tests since
  scm/telemetry pulls in the original eden/scm/lib/configparser which conflicts
  with the hg-server conflict parser.

allow-large-files

Reviewed By: quark-zju

Differential Revision: D27632557

fbshipit-source-id: b2f442f4ec000ea08e4d62de068750832198e1f4
2021-04-09 10:09:06 -07:00

43 lines
1.4 KiB
Perl

#chg-compatible
Crash in histpack code path where the amend destination already exists
$ configure mutation-norecord
$ enable undo treemanifest remotefilelog
$ setconfig treemanifest.treeonly=1 remotefilelog.reponame=foo remotefilelog.cachepath=$TESTTMP/cache
$ setconfig remotefilelog.write-hgcache-to-indexedlog=False remotefilelog.write-local-to-indexedlog=False
$ newrepo
$ drawdag << 'EOS'
> B
> |
> A
> EOS
$ enable undo
$ hg up -q $B
$ echo foo > msg
$ hg --config dummy.option=dummy commit --amend -l msg
$ hg undo -q
hint[undo-uncommit-unamend]: undoing amends discards their changes.
to restore the changes to the working copy, run 'hg revert -r 220f69710758 --all'
in the future, you can use 'hg unamend' instead of 'hg undo' to keep changes
hint[hint-ack]: use 'hg hint --ack undo-uncommit-unamend' to silence these hints
$ hg commit --amend -l msg
Make sure no invalid manifests were written:
$ cd .hg/store/packs/manifests
$ for i in *.histidx; do hg debughistorypack $i; done
Node P1 Node P2 Node Link Node Copy From
41b34f08c135 000000000000 000000000000 426bada5c675
Node P1 Node P2 Node Link Node Copy From
eb7988638387 41b34f08c135 000000000000 220f69710758
Node P1 Node P2 Node Link Node Copy From
eb7988638387 41b34f08c135 000000000000 112478962961