Mercurial > hg
annotate tests/test-revset-outgoing.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 | aa9385f983fa |
children | 82b2ba904e3e |
rev | line source |
---|---|
12614
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
1 $ cat >> $HGRCPATH <<EOF |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
2 > [alias] |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
3 > tlog = log --template "{rev}:{node|short}: '{desc}' {branches}\n" |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
4 > tglog = tlog -G |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
5 > tout = out --template "{rev}:{node|short}: '{desc}' {branches}\n" |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
6 > EOF |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
7 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
8 $ hg init a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
9 $ cd a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
10 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
11 $ echo a > a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
12 $ hg ci -Aqm0 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
13 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
14 $ echo foo >> a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
15 $ hg ci -Aqm1 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
16 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
17 $ hg up -q 0 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
18 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
19 $ hg branch stable |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
20 marked working directory as branch stable |
15615 | 21 (branches are permanent and global, did you want a bookmark?) |
12614
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
22 $ echo bar >> a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
23 $ hg ci -qm2 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
24 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
25 $ hg tglog |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
26 @ 2:7bee6c3bea3a: '2' stable |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
27 | |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
28 | o 1:3560197d8331: '1' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
29 |/ |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
30 o 0:f7b1eb17ad24: '0' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
31 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
32 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
33 $ cd .. |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
34 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
35 $ hg clone -q a#stable b |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
36 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
37 $ cd b |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
38 $ cat .hg/hgrc |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
39 [paths] |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
13572
diff
changeset
|
40 default = $TESTTMP/a#stable (glob) |
12614
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
41 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
42 $ echo red >> a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
43 $ hg ci -qm3 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
44 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
45 $ hg up -q default |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
46 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
47 $ echo blue >> a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
48 $ hg ci -qm4 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
49 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
50 $ hg tglog |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
51 @ 3:f0461977a3db: '4' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
52 | |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
53 | o 2:1d4099801a4e: '3' stable |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
54 | | |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
55 | o 1:7bee6c3bea3a: '2' stable |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
56 |/ |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
57 o 0:f7b1eb17ad24: '0' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
58 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
59 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
60 $ hg tout |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
13572
diff
changeset
|
61 comparing with $TESTTMP/a (glob) |
12614
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
62 searching for changes |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
63 2:1d4099801a4e: '3' stable |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
64 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
65 $ hg tlog -r 'outgoing()' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
66 2:1d4099801a4e: '3' stable |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
67 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
68 $ hg tout ../a#default |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
69 comparing with ../a |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
70 searching for changes |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
71 3:f0461977a3db: '4' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
72 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
73 $ hg tlog -r 'outgoing("../a#default")' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
74 3:f0461977a3db: '4' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
75 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
76 $ echo "green = ../a#default" >> .hg/hgrc |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
77 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
78 $ cat .hg/hgrc |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
79 [paths] |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
13572
diff
changeset
|
80 default = $TESTTMP/a#stable (glob) |
12614
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
81 green = ../a#default |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
82 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
83 $ hg tout green |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
13572
diff
changeset
|
84 comparing with $TESTTMP/a (glob) |
12614
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
85 searching for changes |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
86 3:f0461977a3db: '4' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
87 |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
88 $ hg tlog -r 'outgoing("green")' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
89 3:f0461977a3db: '4' |
f314723f36f5
revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
90 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15623
diff
changeset
|
91 $ cd .. |