annotate tests/test-histedit-outgoing.t @ 20742:3681de20b0a7

parsers: fail fast if Python has wrong minor version (issue4110) This change causes an informative ImportError to be raised when importing the parsers extension module if the minor version of the currently-running Python interpreter doesn't match that of the Python used when compiling the extension module. This change also exposes a parsers.versionerrortext constant in the C implementation of the module. Its presence can be used to determine whether this behavior is present in a version of the module. The value of the constant is the leading text of the ImportError raised and is set to "Python minor version mismatch". Here is an example of what the new error looks like: Traceback (most recent call last): File "test.py", line 1, in <module> import mercurial.parsers ImportError: Python minor version mismatch: The Mercurial extension modules were compiled with Python 2.7.6, but Mercurial is currently using Python with sys.hexversion=33883888: Python 2.5.6 (r256:88840, Nov 18 2012, 05:37:10) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] at: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/Resources/ Python.app/Contents/MacOS/Python The reason for raising an error in this scenario is that Python's C API is known not to be compatible from minor version to minor version, even if sys.api_version is the same. See for example this Python bug report about incompatibilities between 2.5 and 2.6+: http://bugs.python.org/issue8118 These incompatibilities can cause Mercurial to break in mysterious, unforeseen ways. For example, when Mercurial compiled with Python 2.7 was run with 2.5, the following crash occurred when running "hg status": http://bz.selenic.com/show_bug.cgi?id=4110 After this crash was fixed, running with Python 2.5 no longer crashes, but the following puzzling behavior still occurs: $ hg status ... File ".../mercurial/changelog.py", line 123, in __init__ revlog.revlog.__init__(self, opener, "00changelog.i") File ".../mercurial/revlog.py", line 251, in __init__ d = self._io.parseindex(i, self._inline) File ".../mercurial/revlog.py", line 158, in parseindex index, cache = parsers.parse_index2(data, inline) TypeError: data is not a string which can be reproduced more simply with: import mercurial.parsers as parsers parsers.parse_index2("", True) Both the crash and the TypeError occurred because the Python C API's PyString_Check() returns the wrong value when the C header files from Python 2.7 are run with Python 2.5. This is an example of an incompatibility of the sort mentioned in the Python bug report above. Failing fast with an informative error message results in a better user experience in cases like the above. The information in the ImportError also simplifies troubleshooting for those on Mercurial mailing lists, the bug tracker, etc. This patch only adds the version check to parsers.c, which is sufficient to affect command-line commands like "hg status" and "hg summary". An idea for a future improvement is to move the version-checking C code to a more central location, and have it run when importing all Mercurial extension modules and not just parsers.c.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Wed, 04 Dec 2013 20:38:27 -0800
parents 5840da876235
children d2a5986cb89d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
1 $ cat >> $HGRCPATH <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
2 > [extensions]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
3 > histedit=
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
4 > EOF
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
5
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
6 $ initrepos ()
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
7 > {
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
8 > hg init r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
9 > cd r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
10 > for x in a b c ; do
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
11 > echo $x > $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
12 > hg add $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
13 > hg ci -m $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
14 > done
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
15 > cd ..
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
16 > hg clone r r2 | grep -v updating
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
17 > cd r2
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
18 > for x in d e f ; do
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
19 > echo $x > $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
20 > hg add $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
21 > hg ci -m $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
22 > done
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
23 > cd ..
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
24 > hg init r3
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
25 > cd r3
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
26 > for x in g h i ; do
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
27 > echo $x > $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
28 > hg add $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
29 > hg ci -m $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
30 > done
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
31 > cd ..
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
32 > }
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
33
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
34 $ initrepos
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
35 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
36
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
37 show the edit commands offered by outgoing
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
38 $ cd r2
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
39 $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
40 pick 055a42cdd887 3 d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
41 pick e860deea161a 4 e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
42 pick 652413bf663e 5 f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
43
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
44 # Edit history between 055a42cdd887 and 652413bf663e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
45 #
20503
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 20117
diff changeset
46 # Commits are listed from least to most recent
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 20117
diff changeset
47 #
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
48 # Commands:
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
49 # p, pick = use commit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
50 # e, edit = use commit, but stop for amending
20511
5840da876235 histedit: shorten new fold message
Matt Mackall <mpm@selenic.com>
parents: 20503
diff changeset
51 # f, fold = use commit, but combine it with the one above
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
52 # d, drop = remove commit from history
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
53 # m, mess = edit message without changing commit content
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
54 #
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
55 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
56 $ cd ..
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
57
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
58 show the error from unrelated repos
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
59 $ cd r3
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
60 $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
61 abort: repository is unrelated
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
62 [1]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
63 $ cd ..
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
64
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
65 show the error from unrelated repos
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
66 $ cd r3
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
67 $ HGEDITOR=cat hg histedit --force --outgoing ../r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
68 comparing with ../r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
69 searching for changes
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
70 warning: repository is unrelated
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
71 pick 2a4042b45417 0 g
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
72 pick 68c46b4927ce 1 h
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
73 pick 51281e65ba79 2 i
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
74
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
75 # Edit history between 2a4042b45417 and 51281e65ba79
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
76 #
20503
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 20117
diff changeset
77 # Commits are listed from least to most recent
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 20117
diff changeset
78 #
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
79 # Commands:
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
80 # p, pick = use commit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
81 # e, edit = use commit, but stop for amending
20511
5840da876235 histedit: shorten new fold message
Matt Mackall <mpm@selenic.com>
parents: 20503
diff changeset
82 # f, fold = use commit, but combine it with the one above
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
83 # d, drop = remove commit from history
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
84 # m, mess = edit message without changing commit content
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
85 #
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
86 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
87 $ cd ..
18995
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
88
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
89 test sensitivity to branch in URL:
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
90
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
91 $ cd r2
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
92 $ hg -q update 2
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
93 $ hg -q branch foo
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
94 $ hg commit -m 'create foo branch'
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
95 $ HGEDITOR=cat hg histedit --outgoing '../r#foo' | grep -v comparing | grep -v searching
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
96 pick f26599ee3441 6 create foo branch
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
97
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
98 # Edit history between f26599ee3441 and f26599ee3441
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
99 #
20503
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 20117
diff changeset
100 # Commits are listed from least to most recent
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 20117
diff changeset
101 #
18995
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
102 # Commands:
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
103 # p, pick = use commit
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
104 # e, edit = use commit, but stop for amending
20511
5840da876235 histedit: shorten new fold message
Matt Mackall <mpm@selenic.com>
parents: 20503
diff changeset
105 # f, fold = use commit, but combine it with the one above
18995
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
106 # d, drop = remove commit from history
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
107 # m, mess = edit message without changing commit content
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
108 #
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
109 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
19835
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
110
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
111 test to check number of roots in outgoing revisions
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
112
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
113 $ hg -q outgoing -G --template '{node|short}({branch})' '../r'
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
114 @ f26599ee3441(foo)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
115
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
116 o 652413bf663e(default)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
117 |
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
118 o e860deea161a(default)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
119 |
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
120 o 055a42cdd887(default)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
121
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
122 $ HGEDITOR=cat hg -q histedit --outgoing '../r'
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
123 abort: there are ambiguous outgoing revisions
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
124 (see "hg help histedit" for more detail)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
125 [255]
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
126
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
127 $ hg -q update -C 2
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
128 $ echo aa >> a
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
129 $ hg -q commit -m 'another head on default'
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
130 $ hg -q outgoing -G --template '{node|short}({branch})' '../r#default'
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
131 @ 3879dc049647(default)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
132
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
133 o 652413bf663e(default)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
134 |
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
135 o e860deea161a(default)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
136 |
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
137 o 055a42cdd887(default)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
138
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
139 $ HGEDITOR=cat hg -q histedit --outgoing '../r#default'
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
140 abort: there are ambiguous outgoing revisions
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
141 (see "hg help histedit" for more detail)
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
142 [255]
44d7bfe08c14 histedit: abort if there are multiple roots in "--outgoing" revisions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18995
diff changeset
143
18995
0023a6e49268 histedit: make "hg histedit" sensitive to branch in URL
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17284
diff changeset
144 $ cd ..