Mercurial > evolve
annotate tests/test-obsolete-push.t @ 1362:73e5b5280c1c
inhibit: improve performance of transaction wrapping
Before this patch, transaction wrapping was the most expensive part of inhibit
computation wise. This patch changes the revset that we use in the transaction
wrapping to make it ~50x faster to compute:
revset #0: obsolete() - hidden()
0) wall 0.000214 comb 0.000000 user 0.000000 sys 0.000000 (best of 11209)
vs
revset #0: (not hidden()) and obsolete()
0) wall 0.010965 comb 0.010000 user 0.010000 sys 0.000000 (best of 237)
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Sat, 13 Jun 2015 11:14:27 -0700 |
parents | cc3e68120185 |
children | 7463f5880ce9 |
rev | line source |
---|---|
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
1 $ cat >> $HGRCPATH <<EOF |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
2 > [defaults] |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
3 > amend=-d "0 0" |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
4 > [extensions] |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
5 > hgext.graphlog= |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
6 > EOF |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
7 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
8 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
9 $ template='{rev}:{node|short}@{branch}({obsolete}/{phase}) {desc|firstline}\n' |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
10 $ glog() { |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
11 > hg glog --template "$template" "$@" |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
12 > } |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
13 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
14 Test outgoing, common A is suspended, B unstable and C secret, remote |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
15 has A and B, neither A or C should be in outgoing. |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
16 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
17 $ hg init source |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
18 $ cd source |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
19 $ echo a > a |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
20 $ hg ci -qAm A a |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
21 $ echo b > b |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
22 $ hg ci -qAm B b |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
23 $ hg up 0 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
24 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
25 $ echo c > c |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
26 $ hg ci -qAm C c |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
27 $ hg phase --secret --force . |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
28 $ hg kill 0 1 |
688
f2c3fd21fa63
prune: add an informative message about the number of pruned changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
491
diff
changeset
|
29 2 changesets pruned |
486 | 30 1 new unstable changesets |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
31 $ glog --hidden |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
32 @ 2:244232c2222a@default(unstable/secret) C |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
33 | |
385
cdcdedc532b7
obsolete: Stop turning obsolete secret changesets secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
381
diff
changeset
|
34 | x 1:6c81ed0049f8@default(extinct/draft) B |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
35 |/ |
385
cdcdedc532b7
obsolete: Stop turning obsolete secret changesets secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
381
diff
changeset
|
36 x 0:1994f17a630e@default(suspended/draft) A |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
37 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
38 $ hg init ../clone |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
39 $ cat > ../clone/.hg/hgrc <<EOF |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
40 > [phases] |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
41 > publish = false |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
42 > EOF |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
43 $ hg outgoing ../clone --template "$template" |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
44 comparing with ../clone |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
45 searching for changes |
385
cdcdedc532b7
obsolete: Stop turning obsolete secret changesets secret
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
381
diff
changeset
|
46 0:1994f17a630e@default(suspended/draft) A |