##// END OF EJS Templates
histedit: select the lowest rev when looking for a root in a revset (bc)...
David Soria Parra -
r20806:d66862b8 default
parent child Browse files
Show More
@@ -158,7 +158,6 b' from mercurial import context'
158 from mercurial import hg
158 from mercurial import hg
159 from mercurial import node
159 from mercurial import node
160 from mercurial import repair
160 from mercurial import repair
161 from mercurial import scmutil
162 from mercurial import util
161 from mercurial import util
163 from mercurial import obsolete
162 from mercurial import obsolete
164 from mercurial import merge as mergemod
163 from mercurial import merge as mergemod
@@ -568,8 +567,11 b' def _histedit(ui, repo, *freeargs, **opt'
568 remote = None
567 remote = None
569 root = findoutgoing(ui, repo, remote, force, opts)
568 root = findoutgoing(ui, repo, remote, force, opts)
570 else:
569 else:
571 root = revs[0]
570 rootrevs = list(repo.set('roots(%lr)', revs))
572 root = scmutil.revsingle(repo, root).node()
571 if len(rootrevs) != 1:
572 raise util.Abort(_('The specified revisions must have ' +
573 'exactly one common root'))
574 root = rootrevs[0].node()
573
575
574 keep = opts.get('keep', False)
576 keep = opts.get('keep', False)
575 revs = between(repo, root, topmost, keep)
577 revs = between(repo, root, topmost, keep)
@@ -72,6 +72,26 b' Run on a revision not ancestors of the c'
72 [255]
72 [255]
73 $ hg up --quiet
73 $ hg up --quiet
74
74
75
76 Test that we pick the minimum of a revrange
77 ---------------------------------------
78
79 $ HGEDITOR=cat hg histedit '2::' --commands - << EOF
80 > pick eb57da33312f 2 three
81 > pick c8e68270e35a 3 four
82 > pick 08d98a8350f3 4 five
83 > EOF
84 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 $ hg up --quiet
86
87 $ HGEDITOR=cat hg histedit 'tip:2' --commands - << EOF
88 > pick eb57da33312f 2 three
89 > pick c8e68270e35a 3 four
90 > pick 08d98a8350f3 4 five
91 > EOF
92 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
93 $ hg up --quiet
94
75 Run on a revision not descendants of the initial parent
95 Run on a revision not descendants of the initial parent
76 --------------------------------------------------------------------
96 --------------------------------------------------------------------
77
97
@@ -198,3 +218,12 b' short hash. This tests issue3893.'
198 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
218 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
199 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
219 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/*-backup.hg (glob)
220 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/*-backup.hg (glob)
221
222 $ hg update -q 2
223 $ echo x > x
224 $ hg add x
225 $ hg commit -m'x' x
226 created new head
227 $ hg histedit -r 'heads(all())'
228 abort: The specified revisions must have exactly one common root
229 [255]
General Comments 0
You need to be logged in to leave comments. Login now