##// END OF EJS Templates
histedit: allow configuring default behavior...
Durham Goode -
r24009:00d33176 default
parent child Browse files
Show More
@@ -579,6 +579,10 b' def _histedit(ui, repo, state, *freeargs'
579 _('only one repo argument allowed with --outgoing'))
579 _('only one repo argument allowed with --outgoing'))
580 else:
580 else:
581 revs.extend(freeargs)
581 revs.extend(freeargs)
582 if len(revs) == 0:
583 histeditdefault = ui.config('histedit', 'defaultrev')
584 if histeditdefault:
585 revs.append(histeditdefault)
582 if len(revs) != 1:
586 if len(revs) != 1:
583 raise util.Abort(
587 raise util.Abort(
584 _('histedit requires exactly one ancestor revision'))
588 _('histedit requires exactly one ancestor revision'))
@@ -103,6 +103,15 b' Test that we pick the minimum of a revra'
103 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 $ hg up --quiet
104 $ hg up --quiet
105
105
106 Test config specified default
107 -----------------------------
108
109 $ HGEDITOR=cat hg histedit --config "histedit.defaultrev=only(.) - ::eb57da33312f" --commands - << EOF
110 > pick c8e68270e35a 3 four
111 > pick 08d98a8350f3 4 five
112 > EOF
113 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
114
106 Run on a revision not descendants of the initial parent
115 Run on a revision not descendants of the initial parent
107 --------------------------------------------------------------------
116 --------------------------------------------------------------------
108
117
General Comments 0
You need to be logged in to leave comments. Login now