annotate tests/test-prev-next.t @ 3600:6fd84046d4a4 mercurial-4.1

branching: close mercurial-4.1 test branch
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 22 Mar 2018 01:20:03 +0100
parents b92114f201c9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
3547
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
2 > [ui]
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
3 > interactive = True
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
4 > [extensions]
2423
677dfbb8bdbf test: enforce color to be enabled
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 1806
diff changeset
5 > color =
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
6 > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1756
diff changeset
7 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
8
3196
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
9 hg prev & next move to parent/child
2737
66278c4d9c07 prev: stop creating a repository at the root of 'test-repo.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2443
diff changeset
10 $ hg init test-repo
66278c4d9c07 prev: stop creating a repository at the root of 'test-repo.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2443
diff changeset
11 $ cd test-repo
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
12 $ touch a
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
13 $ hg add a
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
14 $ hg commit -m 'added a'
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
15 $ touch b
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
16 $ hg add b
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
17 $ hg commit -m 'added b'
3196
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
18 $ hg prev
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
19 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
20 [0] added a
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
21 $ hg next
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
23 [1] added b
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
24
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
25 hg prev & next respect --quiet
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
26 $ hg prev -q
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
27 $ hg next -q
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
28
94e5235e95f5 evolve: make prev/next respect --quiet flag (issue5742)
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
29 hg prev -B should move active bookmark
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
30 $ hg bookmark mark
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
31 $ hg bookmarks
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
32 * mark 1:6e742c9127b3
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
33 $ hg prev -B
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
34 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
35 [0] added a
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
36 $ hg bookmarks
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
37 * mark 0:a154386e50d1
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
38
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
39 hg next -B should move active bookmark
1500
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
40 $ hg next -B --dry-run
3546
d197e6f0d0e3 next: show changeset hash in `--dry-run` instead of rev numbers
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3501
diff changeset
41 hg update 6e742c9127b3;
d197e6f0d0e3 next: show changeset hash in `--dry-run` instead of rev numbers
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3501
diff changeset
42 hg bookmark mark -r 6e742c9127b3;
1500
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
43 [1] added b
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
44 $ hg next -B
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
46 [1] added b
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
47 $ hg bookmarks
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
48 * mark 1:6e742c9127b3
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
49
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
50 hg prev should unset active bookmark
1500
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
51 $ hg prev --dry-run
3552
7e8b2c9edf36 prev: show changeset hash in --dry-run instead of rev numbers
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3551
diff changeset
52 hg update a154386e50d1;
1500
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
53 [0] added a
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
54 $ hg prev
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
55 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
56 [0] added a
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
57 $ hg bookmarks
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
58 mark 1:6e742c9127b3
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
59
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
60 hg next should move active bookmark
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
61 $ hg bookmark mark2
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
62 $ hg bookmarks
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
63 mark 1:6e742c9127b3
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
64 * mark2 0:a154386e50d1
2396
c1485ebdd6b9 color: update the shorttemplate to use colors
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
65 $ hg next --dry-run --color=debug
3546
d197e6f0d0e3 next: show changeset hash in `--dry-run` instead of rev numbers
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3501
diff changeset
66 hg update 6e742c9127b3;
2396
c1485ebdd6b9 color: update the shorttemplate to use colors
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
67 [[evolve.rev|1]] added b
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
68 $ hg next
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
70 [1] added b
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
71 $ hg bookmarks
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
72 mark 1:6e742c9127b3
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
73 mark2 0:a154386e50d1
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
74
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
75 $ hg bookmark -d mark2
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
76 $ hg bookmark mark
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
77
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
78 hg next/prev should not interfere with inactive bookmarks
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
79 $ touch c
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
80 $ hg add c
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
81 $ hg commit -m 'added c'
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
82 $ hg bookmark -r2 no-move
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
83 $ hg prev -B
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
84 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
85 [1] added b
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
86 $ hg bookmarks
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
87 * mark 1:6e742c9127b3
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
88 no-move 2:4e26ef31f919
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
89 $ hg next -B
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
91 [2] added c
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
92 $ hg bookmarks
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
93 * mark 2:4e26ef31f919
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
94 no-move 2:4e26ef31f919
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
95 $ hg up 1
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
96 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
964
c768f7666106 test: update to output change introduced by future 3.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 892
diff changeset
97 (leaving bookmark mark)
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
98 $ hg next -B
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
100 [2] added c
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
101 $ hg bookmarks
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
102 mark 2:4e26ef31f919
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
103 no-move 2:4e26ef31f919
1160
e29a813f6af5 Make next/prev only move bookmarks optionally
Ryan McElroy <rmcelroy@fb.com>
parents: 964
diff changeset
104 $ hg prev -B
892
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
105 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
106 [1] added b
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
107 $ hg bookmarks
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
108 mark 2:4e26ef31f919
947fb5b1915b evolve: active bookmark should move when using prev/next (#37)
Olle Lundberg <geek@nerd.sh>
parents:
diff changeset
109 no-move 2:4e26ef31f919
1427
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
110
2738
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
111 test prev on root
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
112
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
113 $ hg up null
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
114 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
115 $ hg prev
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
116 already at repository root
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
117 [1]
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
118 $ hg up 1
3f27fe80be26 prev: issue a proper error when reaching repository root
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2737
diff changeset
119 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1427
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
120
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
121 Behavior with local modification
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
122 --------------------------------
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
123
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
124 $ echo foo > modified-bar
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
125 $ hg add modified-bar
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
126 $ hg prev
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
127 abort: uncommitted changes
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
128 (do you want --merge?)
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
129 [255]
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
130 $ hg prev --merge
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
132 [0] added a
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
133 $ hg next
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
134 abort: uncommitted changes
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
135 (do you want --merge?)
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
136 [255]
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
137 $ hg next --merge
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
138 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
139 [1] added b
fcc467ca740e next/prev: require --merge to move with uncommitted changes
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1185
diff changeset
140
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
141 Behavior with aspiring children
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
142 -------------------------------
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
143
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
144 $ hg revert --all
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
145 forgetting modified-bar
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
146 $ hg log -G
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
147 o changeset: 2:4e26ef31f919
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
148 | bookmark: mark
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
149 | bookmark: no-move
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
150 | tag: tip
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
151 | user: test
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
152 | date: Thu Jan 01 00:00:00 1970 +0000
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
153 | summary: added c
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
154 |
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
155 @ changeset: 1:6e742c9127b3
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
156 | user: test
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
157 | date: Thu Jan 01 00:00:00 1970 +0000
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
158 | summary: added b
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
159 |
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
160 o changeset: 0:a154386e50d1
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
161 user: test
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
162 date: Thu Jan 01 00:00:00 1970 +0000
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
163 summary: added a
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
164
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
165
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
166 no children of any kind
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
167
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
168 $ hg next
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
170 [2] added c
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
171 $ hg next
1447
09206bdc2db4 next: reword error output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1445
diff changeset
172 no children
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
173 [1]
1487
ee5391999f2d next: properly report no children when --evolve is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1449
diff changeset
174 $ hg next --evolve
ee5391999f2d next: properly report no children when --evolve is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1449
diff changeset
175 no children
ee5391999f2d next: properly report no children when --evolve is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1449
diff changeset
176 [1]
2396
c1485ebdd6b9 color: update the shorttemplate to use colors
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
177 $ hg prev --dry-run --color=debug
3552
7e8b2c9edf36 prev: show changeset hash in --dry-run instead of rev numbers
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3551
diff changeset
178 hg update 6e742c9127b3;
2396
c1485ebdd6b9 color: update the shorttemplate to use colors
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
179 [[evolve.rev|1]] added b
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
180 $ hg prev
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
181 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
182 [1] added b
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
183
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
184 some aspiring children
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
185
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
186 $ hg amend -m 'added b (2)'
3106
a867d59ea97a test-compat: revert output changes from phase renaming
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
187 1 new unstable changesets
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
188 $ hg next
1447
09206bdc2db4 next: reword error output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1445
diff changeset
189 no children
1449
9be1cadf7a07 next: add a --evolve option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1448
diff changeset
190 (1 unstable changesets to be evolved here, do you want --evolve?)
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
191 [1]
1500
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
192 $ hg next --evolve --dry-run
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
193 move:[2] added c
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
194 atop:[3] added b (2)
b4dfafda72c2 next: add support for --dry-run
timeless@mozdev.org
parents: 1487
diff changeset
195 hg rebase -r 4e26ef31f919 -d 9ad178109a19
2443
6a23a55f77d2 next: prevent a color related crash when evolve
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2396
diff changeset
196
6a23a55f77d2 next: prevent a color related crash when evolve
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2396
diff changeset
197 (add color output for smoke testing)
6a23a55f77d2 next: prevent a color related crash when evolve
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2396
diff changeset
198
6a23a55f77d2 next: prevent a color related crash when evolve
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2396
diff changeset
199 $ hg next --evolve --color debug
3501
7c8150697810 color: add some colors to evolve command itself
Boris Feld <boris.feld@octobus.net>
parents: 3488
diff changeset
200 [evolve.operation|move:][[evolve.rev|2]] added c
2443
6a23a55f77d2 next: prevent a color related crash when evolve
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2396
diff changeset
201 atop:[[evolve.rev|3]] added b (2)
6a23a55f77d2 next: prevent a color related crash when evolve
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2396
diff changeset
202 [ ui.status|working directory now at [evolve.node|e3b6d5df389b]]
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
203
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
204 next with ambiguity
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
205
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
206 $ hg prev
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
207 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
208 [3] added b (2)
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
209 $ echo d > d
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
210 $ hg add d
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
211 $ hg commit -m 'added d'
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
212 created new head
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
213 $ hg prev
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
214 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
215 [3] added b (2)
3547
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
216 $ hg next <<EOF
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
217 > 1
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
218 > EOF
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
219 ambiguous next changeset, choose one to update:
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
220 0: [e3b6d5df389b] added c
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
221 1: [9df671ccd2c7] added d
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
222 q: quit the prompt
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
223 enter the index of the revision you want to select: 1
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
224 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
225 [5] added d
3547
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
226
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
227 $ hg prev
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
228 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
78abffad8626 next: prompt user to choose a children in case of ambiguity
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3546
diff changeset
229 [3] added b (2)
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
230
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
231 next with ambiguity in aspiring children
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
232
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
233 $ hg am -m 'added b (3)'
3106
a867d59ea97a test-compat: revert output changes from phase renaming
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
234 2 new unstable changesets
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
235 $ hg next
1447
09206bdc2db4 next: reword error output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1445
diff changeset
236 no children
1449
9be1cadf7a07 next: add a --evolve option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1448
diff changeset
237 (2 unstable changesets to be evolved here, do you want --evolve?)
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
238 [1]
3549
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
239 $ hg next --evolve <<EOF
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
240 > 0
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
241 > EOF
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
242 ambiguous next (unstable) changeset, choose one to evolve and update:
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
243 0: [e3b6d5df389b] added c
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
244 1: [9df671ccd2c7] added d
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
245 q: quit the prompt
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
246 enter the index of the revision you want to select: 0
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
247 move:[4] added c
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
248 atop:[6] added b (3)
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
249 working directory now at 5ce67c2407b0
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
250
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
251 $ hg log -GT "{rev}:{node|short} {desc}\n"
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
252 @ 7:5ce67c2407b0 added c
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
253 |
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
254 o 6:d7f119adc759 added b (3)
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
255 |
3590
d5adce52cef4 test-compat: merge stable into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3552
diff changeset
256 | o 5:9df671ccd2c7 added d
3549
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
257 | |
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
258 | x 3:9ad178109a19 added b (2)
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
259 |/
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
260 o 0:a154386e50d1 added a
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
261
802441114400 next: prompt user to choose child in ambiguity in `hg next --evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3547
diff changeset
262
1445
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
263 $ hg evolve -r 5
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
264 move:[5] added d
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
265 atop:[6] added b (3)
6fd6c98f9f70 next: add extensive testing to the 'next' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1427
diff changeset
266 working directory is now at 47ea25be8aea
1742
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
267
3551
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
268 prev with multiple parents
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
269
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
270 $ hg log -GT "{rev}:{node|short} {desc}\n"
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
271 @ 8:47ea25be8aea added d
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
272 |
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
273 | o 7:5ce67c2407b0 added c
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
274 |/
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
275 o 6:d7f119adc759 added b (3)
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
276 |
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
277 o 0:a154386e50d1 added a
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
278
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
279 $ hg merge -r 5ce67c2407b0
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
280 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
281 (branch merge, don't forget to commit)
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
282 $ hg ci -m "merge commit"
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
283
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
284 $ hg prev <<EOF
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
285 > q
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
286 > EOF
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
287 multiple parents, choose one to update:
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
288 0: [47ea25be8aea] added d
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
289 1: [5ce67c2407b0] added c
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
290 q: quit the prompt
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
291 enter the index of the revision you want to select: q
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
292 [8] added d
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
293 [7] added c
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
294 multiple parents, explicitly update to one
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
295 [1]
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
296
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
297 $ hg prev --config ui.interactive=False
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
298 [8] added d
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
299 [7] added c
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
300 multiple parents, explicitly update to one
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
301 [1]
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
302
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
303 $ hg prev <<EOF
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
304 > 1
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
305 > EOF
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
306 multiple parents, choose one to update:
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
307 0: [47ea25be8aea] added d
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
308 1: [5ce67c2407b0] added c
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
309 q: quit the prompt
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
310 enter the index of the revision you want to select: 1
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
311 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
312 [7] added c
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
313
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
314 $ hg log -GT "{rev}:{node|short} {desc}\n"
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
315 o 9:a4b8c25a87d3 merge commit
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
316 |\
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
317 | o 8:47ea25be8aea added d
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
318 | |
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
319 @ | 7:5ce67c2407b0 added c
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
320 |/
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
321 o 6:d7f119adc759 added b (3)
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
322 |
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
323 o 0:a154386e50d1 added a
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
324
ce346c6165c6 prev: prompt user to choose parent in case of multiple parents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3549
diff changeset
325
2737
66278c4d9c07 prev: stop creating a repository at the root of 'test-repo.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2443
diff changeset
326 $ cd ..
66278c4d9c07 prev: stop creating a repository at the root of 'test-repo.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2443
diff changeset
327
1742
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
328 prev and next should lock properly against other commands
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
329
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
330 $ hg init repo
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
331 $ cd repo
3486
bee9fee8f36b test: explicitly run HGEDITOR shell command with `sh`
Matt Harbison <matt_harbison@yahoo.com>
parents: 3232
diff changeset
332 $ HGEDITOR="sh ${TESTDIR}/fake-editor.sh"
1742
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
333 $ echo hi > foo
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
334 $ hg ci -Am 'one'
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
335 adding foo
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
336 $ echo bye > foo
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
337 $ hg ci -Am 'two'
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
338
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
339 $ hg amend --edit &
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
340 $ sleep 1
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
341 $ hg prev
1743
299cdaa24fa5 merge with stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1742
diff changeset
342 waiting for lock on working directory of $TESTTMP/repo held by process '*' on host '*' (glob)
1742
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
343 got lock after [4-6] seconds (re)
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
344 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
345 [0] one
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
346 $ wait
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
347
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
348 $ hg amend --edit &
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
349 $ sleep 1
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
350 $ hg next --evolve
1743
299cdaa24fa5 merge with stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1742
diff changeset
351 waiting for lock on working directory of $TESTTMP/repo held by process '*' on host '*' (glob)
3106
a867d59ea97a test-compat: revert output changes from phase renaming
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
352 1 new unstable changesets
1742
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
353 got lock after [4-6] seconds (re)
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
354 move:[2] two
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
355 atop:[3] one
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
356 working directory now at a7d885c75614
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents: 1500
diff changeset
357 $ wait