##// END OF EJS Templates
histedit: abort if there are multiple roots in "--outgoing" revisions...
FUJIWARA Katsunori -
r19841:fab75342 stable
parent child Browse files
Show More
@@ -426,7 +426,12 b' def findoutgoing(ui, repo, remote=None, '
426 426 outgoing = discovery.findcommonoutgoing(repo, other, revs, force=force)
427 427 if not outgoing.missing:
428 428 raise util.Abort(_('no outgoing ancestors'))
429 return outgoing.missing[0]
429 roots = list(repo.revs("roots(%ln)", outgoing.missing))
430 if 1 < len(roots):
431 msg = _('there are ambiguous outgoing revisions')
432 hint = _('see "hg help histedit" for more detail')
433 raise util.Abort(msg, hint=hint)
434 return repo.lookup(roots[0])
430 435
431 436 actiontable = {'p': pick,
432 437 'pick': pick,
@@ -102,4 +102,38 b' test sensitivity to branch in URL:'
102 102 # m, mess = edit message without changing commit content
103 103 #
104 104 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
105
106 test to check number of roots in outgoing revisions
107
108 $ hg -q outgoing -G --template '{node|short}({branch})' '../r'
109 @ f26599ee3441(foo)
110
111 o 652413bf663e(default)
112 |
113 o e860deea161a(default)
114 |
115 o 055a42cdd887(default)
116
117 $ HGEDITOR=cat hg -q histedit --outgoing '../r'
118 abort: there are ambiguous outgoing revisions
119 (see "hg help histedit" for more detail)
120 [255]
121
122 $ hg -q update -C 2
123 $ echo aa >> a
124 $ hg -q commit -m 'another head on default'
125 $ hg -q outgoing -G --template '{node|short}({branch})' '../r#default'
126 @ 3879dc049647(default)
127
128 o 652413bf663e(default)
129 |
130 o e860deea161a(default)
131 |
132 o 055a42cdd887(default)
133
134 $ HGEDITOR=cat hg -q histedit --outgoing '../r#default'
135 abort: there are ambiguous outgoing revisions
136 (see "hg help histedit" for more detail)
137 [255]
138
105 139 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now