Mercurial > hg
annotate tests/test-cat.t @ 20275:2123d27ff75d
backout: avoid update on simple case.
Before the changeset the backout process was:
1) go to <target>
2) revert to <target> parent
3) update back to changeset we came from
The two update steps can takes a very long time to move back and forth unrelated
file change between <target> and current working directory.
The new process is just merging current working directory with the parent of
<target> using <target> as ancestor. This give the very same result but skip
the two updates. On big repo with a lot of files and changes that save a lots of
time (x20 for one week window).
The "merge" version (hg backout --merge) is still done with upgrades. We could
imagine using in memory commit to speed it up but this is another fish.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 08 Jan 2014 14:53:46 -0800 |
parents | 1310489eb5d6 |
children | 50107a4b32e7 |
rev | line source |
---|---|
11874 | 1 $ hg init |
2 $ echo 0 > a | |
3 $ echo 0 > b | |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12070
diff
changeset
|
4 $ hg ci -A -m m |
11874 | 5 adding a |
6 adding b | |
7 $ hg rm a | |
8 $ hg cat a | |
9 0 | |
10 $ hg cat --decode a # more tests in test-encode | |
11 0 | |
12 $ echo 1 > b | |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12070
diff
changeset
|
13 $ hg ci -m m |
11874 | 14 $ echo 2 > b |
15 $ hg cat -r 0 a | |
16 0 | |
17 $ hg cat -r 0 b | |
18 0 | |
19 $ hg cat -r 1 a | |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12070
diff
changeset
|
20 a: no such file in rev 7040230c159c |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
21 [1] |
11874 | 22 $ hg cat -r 1 b |
23 1 | |
17371
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
24 |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
25 Test fileset |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
26 |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
27 $ echo 3 > c |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
28 $ hg ci -Am addmore c |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
29 $ hg cat 'set:not(b) or a' |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
30 3 |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
31 $ hg cat 'set:c or b' |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
32 1 |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
33 3 |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
12316
diff
changeset
|
34 |