annotate tests/test-options.t @ 1410:2c451fece7a6

evolve: unify revision handling and rework error message This changesets do a massive refactoring of the way evolve select changesets to be evolve. We now use a two stages approach: 1) read command line argument and produce a list of revision to evolve. 2) evolve all these revisions. This allow a much cleaner, robust and extensible code. In the process the error message issued when there is nothing to evolve have been updated to informs about other troubles in the repository and point at useful option to solve them. The 'update' case is handled independently at the start of the function.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 19 Jun 2015 14:26:33 -0700
parents 901d2f4b21a9
children 9f42f819267b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1226
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
2 > [ui]
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
3 > logtemplate={rev}:{node|short}[{bookmarks}] ({obsolete}/{phase}) {desc|firstline}\n
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
4 > [extensions]
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
5 > EOF
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
6 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
7
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
8 $ mkcommit() {
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
9 > echo "$1" > "$1"
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
10 > hg add "$1"
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
11 > hg ci -m "add $1"
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
12 > }
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
13
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
14 $ hg init repo
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
15 $ cd repo
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
16 $ mkcommit a
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
17 $ mkcommit b
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
18
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
19 test disabling commands
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
20
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
21 $ cat >> .hg/hgrc <<EOF
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
22 > [experimental]
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
23 > evolution=createmarkers
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
24 > allowunstable
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
25 > exchange
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
26 > EOF
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
27 $ hg prune | head -n 2
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
28 hg: unknown command 'prune'
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
29 Mercurial Distributed SCM
901d2f4b21a9 config: allow disabling commands
Durham Goode <durham@fb.com>
parents:
diff changeset
30