mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
98d9269874
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
88 lines
1.4 KiB
Perl
88 lines
1.4 KiB
Perl
#chg-compatible
|
|
|
|
$ enable amend
|
|
$ setconfig diff.git=1
|
|
|
|
$ configure mutation-norecord
|
|
|
|
Basic amend
|
|
|
|
$ hg init repo1
|
|
$ cd repo1
|
|
$ hg debugdrawdag <<'EOS'
|
|
> B
|
|
> |
|
|
> A
|
|
> EOS
|
|
|
|
$ hg update B -q
|
|
$ echo 2 >> B
|
|
$ hg amend
|
|
$ hg log -r . -T '{files}'
|
|
B (no-eol)
|
|
$ hg st
|
|
|
|
Now revert and amend file B, we should get an empty commit
|
|
$ hg revert -r .^ B
|
|
$ hg amend
|
|
$ hg st
|
|
$ hg log -r . -T '{files}'
|
|
|
|
|
|
Create a commit with a few files, revert a few of them
|
|
and then amend them one by one
|
|
$ echo 1 > 1
|
|
$ echo 2 > 2
|
|
$ echo 3 > 3
|
|
$ hg add 1 2 3
|
|
$ hg ci -m '1 2 3'
|
|
$ hg revert -r .^ 1
|
|
$ hg revert -r .^ 2
|
|
|
|
Now amend a single file
|
|
$ hg st
|
|
R 1
|
|
R 2
|
|
$ hg amend 1
|
|
$ hg st
|
|
R 2
|
|
$ hg log -r . -T '{files}'
|
|
2 3 (no-eol)
|
|
|
|
Now amend the second file
|
|
$ hg amend 2
|
|
$ hg st
|
|
$ hg log -r . -T '{files}'
|
|
3 (no-eol)
|
|
|
|
Now rename a file and amend
|
|
$ hg mv 3 33
|
|
$ hg amend
|
|
$ hg st
|
|
$ hg log -r . -T '{files}'
|
|
33 (no-eol)
|
|
|
|
$ hg mv 33 333
|
|
$ hg amend 333
|
|
$ hg log -r . -T '{files}'
|
|
33 333 (no-eol)
|
|
|
|
|
|
Create a commit with two files, then change these files in another
|
|
commit, then revert two of them and then amend a single one
|
|
$ echo x > x
|
|
$ echo y > y
|
|
$ hg add x y
|
|
$ hg ci -m 'x y'
|
|
$ echo xx > x
|
|
$ echo yy > y
|
|
$ hg ci -m 'xx yy'
|
|
$ hg revert -r .^ x
|
|
$ hg revert -r .^ y
|
|
$ hg amend x
|
|
$ hg st
|
|
M y
|
|
$ hg log -r . -T '{files}'
|
|
y (no-eol)
|
|
|