annotate tests/test-obsolete-rebase.t @ 280:fd43e3908f09

test-obsolete-rebase.t: move --keep test from test-obsolete.t
author Patrick Mezard <patrick@mezard.eu>
date Tue, 19 Jun 2012 14:02:12 +0200
parents 0d87b1fbf32b
children 05ab164c6593
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
279
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
2 > [defaults]
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
3 > amend=-d "0 0"
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
4 > [extensions]
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
5 > hgext.rebase=
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
6 > hgext.graphlog=
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
7 > EOF
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
8 $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
9
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
10 $ glog() {
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
11 > hg glog --template '{rev}:{node|short}@{branch}({phase}) {desc|firstline}\n'\
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
12 > "$@"
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
13 > }
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
14
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
15 $ hg init repo
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
16 $ cd repo
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
17 $ echo a > a
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
18 $ hg ci -Am adda
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
19 adding a
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
20 $ echo a >> a
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
21 $ hg ci -m changea
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
22
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
23 Test regular rebase
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
24
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
25 $ hg up 0
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
27 $ echo b > b
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
28 $ hg ci -Am addb
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
29 adding b
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
30 created new head
280
fd43e3908f09 test-obsolete-rebase.t: move --keep test from test-obsolete.t
Patrick Mezard <patrick@mezard.eu>
parents: 279
diff changeset
31 $ hg rebase -d 1 --keep
fd43e3908f09 test-obsolete-rebase.t: move --keep test from test-obsolete.t
Patrick Mezard <patrick@mezard.eu>
parents: 279
diff changeset
32 abort: rebase --keep option is unsupported with obsolete extension
fd43e3908f09 test-obsolete-rebase.t: move --keep test from test-obsolete.t
Patrick Mezard <patrick@mezard.eu>
parents: 279
diff changeset
33 (see 'hg help obsolete')
fd43e3908f09 test-obsolete-rebase.t: move --keep test from test-obsolete.t
Patrick Mezard <patrick@mezard.eu>
parents: 279
diff changeset
34 [255]
279
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
35 $ hg rebase -d 1
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
36 $ glog --hidden
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
37 @ 3:03f017c74faa@default(draft) addb
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
38 |
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
39 | o 2:102a90ea7b4a@default(secret) addb
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
40 | |
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
41 o | 1:540395c44225@default(draft) changea
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
42 |/
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
43 o 0:07f494440405@default(draft) adda
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
44
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
45 $ hg debugsuccessors
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
46 102a90ea7b4a 03f017c74faa
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
47
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
48 Test rebase with deleted empty revision
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
49
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
50 $ hg up 0
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
51 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
52 $ hg branch foo
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
53 marked working directory as branch foo
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
54 (branches are permanent and global, did you want a bookmark?)
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
55 $ echo a >> a
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
56 $ hg ci -m changea
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
57 $ hg rebase -d 1
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
58 $ glog --hidden
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
59 o 4:4e322f7ce8e3@foo(secret) changea
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
60 |
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
61 | o 3:03f017c74faa@default(draft) addb
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
62 | |
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
63 +---o 2:102a90ea7b4a@default(secret) addb
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
64 | |
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
65 | @ 1:540395c44225@default(draft) changea
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
66 |/
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
67 o 0:07f494440405@default(draft) adda
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
68
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
69 $ hg debugsuccessors
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
70 102a90ea7b4a 03f017c74faa
0d87b1fbf32b obsolete: handle rebase removing empty changesets
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
71 4e322f7ce8e3 000000000000