mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +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
163 lines
4.5 KiB
Perl
163 lines
4.5 KiB
Perl
#chg-compatible
|
|
|
|
$ . "$TESTDIR/histedit-helpers.sh"
|
|
|
|
$ enable histedit
|
|
|
|
$ initrepo ()
|
|
> {
|
|
> hg init r
|
|
> cd r
|
|
> for x in a b c d e f ; do
|
|
> echo $x > $x
|
|
> hg add $x
|
|
> hg ci -m $x
|
|
> done
|
|
> echo a >> e
|
|
> hg ci -m 'does not commute with e'
|
|
> cd ..
|
|
> }
|
|
|
|
$ initrepo
|
|
$ cd r
|
|
|
|
log before edit
|
|
$ hg log --graph
|
|
@ commit: bfa474341cc9
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: does not commute with e
|
|
│
|
|
o commit: 652413bf663e
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: f
|
|
│
|
|
o commit: e860deea161a
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: e
|
|
│
|
|
o commit: 055a42cdd887
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: d
|
|
│
|
|
o commit: 177f92b77385
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: c
|
|
│
|
|
o commit: d2ae7f538514
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: b
|
|
│
|
|
o commit: cb9a9f314b8b
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: a
|
|
|
|
|
|
edit the history
|
|
$ hg histedit 177f92b77385 --commands - 2>&1 <<EOF | fixbundle
|
|
> pick 177f92b77385 c
|
|
> pick 055a42cdd887 d
|
|
> pick bfa474341cc9 does not commute with e
|
|
> pick e860deea161a e
|
|
> pick 652413bf663e f
|
|
> EOF
|
|
merging e
|
|
warning: 1 conflicts while merging e! (edit, then use 'hg resolve --mark')
|
|
Fix up the change (pick e860deea161a)
|
|
(hg histedit --continue to resume)
|
|
|
|
insert unsupported advisory merge record
|
|
$ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x
|
|
$ hg debugmergestate
|
|
* version 2 records
|
|
local: 8f7551c7e4a2f2efe0bc8c741baf7f227d65d758
|
|
other: e860deea161a2f77de56603b340ebbb4536308ae
|
|
labels:
|
|
local: local
|
|
other: histedit
|
|
unrecognized entry: x advisory record
|
|
file extras: e (ancestorlinknode = 0000000000000000000000000000000000000000)
|
|
file: e (record type "F", state "u", hash 58e6b3a414a1e090dfc6029add0f3555ccba127f)
|
|
local path: e (flags "")
|
|
ancestor path: e (node null)
|
|
other path: e (node 6b67ccefd5ce6de77e7ead4f5292843a0255329f)
|
|
$ hg resolve -l
|
|
U e
|
|
|
|
insert unsupported mandatory merge record
|
|
$ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -X
|
|
$ hg debugmergestate
|
|
* version 2 records
|
|
local: 8f7551c7e4a2f2efe0bc8c741baf7f227d65d758
|
|
other: e860deea161a2f77de56603b340ebbb4536308ae
|
|
labels:
|
|
local: local
|
|
other: histedit
|
|
file extras: e (ancestorlinknode = 0000000000000000000000000000000000000000)
|
|
file: e (record type "F", state "u", hash 58e6b3a414a1e090dfc6029add0f3555ccba127f)
|
|
local path: e (flags "")
|
|
ancestor path: e (node null)
|
|
other path: e (node 6b67ccefd5ce6de77e7ead4f5292843a0255329f)
|
|
unrecognized entry: X mandatory record
|
|
$ hg resolve -l
|
|
abort: unsupported merge state records: X
|
|
(see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
|
|
[255]
|
|
$ hg resolve -ma
|
|
abort: unsupported merge state records: X
|
|
(see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
|
|
[255]
|
|
|
|
abort the edit (should clear out merge state)
|
|
$ hg histedit --abort 2>&1 | fixbundle
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
$ hg debugmergestate
|
|
no merge state found
|
|
|
|
log after abort
|
|
$ hg resolve -l
|
|
$ hg log --graph
|
|
@ commit: bfa474341cc9
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: does not commute with e
|
|
│
|
|
o commit: 652413bf663e
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: f
|
|
│
|
|
o commit: e860deea161a
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: e
|
|
│
|
|
o commit: 055a42cdd887
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: d
|
|
│
|
|
o commit: 177f92b77385
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: c
|
|
│
|
|
o commit: d2ae7f538514
|
|
│ user: test
|
|
│ date: Thu Jan 01 00:00:00 1970 +0000
|
|
│ summary: b
|
|
│
|
|
o commit: cb9a9f314b8b
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: a
|
|
|
|
|
|
$ cd ..
|