Show More
@@ -221,7 +221,7 b" configitem('experimental', 'histedit.aut" | |||
|
221 | 221 | default=False, |
|
222 | 222 | ) |
|
223 | 223 | configitem('histedit', 'defaultrev', |
|
224 | default=configitem.dynamicdefault, | |
|
224 | default=None, | |
|
225 | 225 | ) |
|
226 | 226 | configitem('histedit', 'dropmissing', |
|
227 | 227 | default=False, |
@@ -340,18 +340,20 b" def destmerge(repo, action='merge', sour" | |||
|
340 | 340 | onheadcheck=onheadcheck, destspace=destspace) |
|
341 | 341 | return repo[node].rev() |
|
342 | 342 | |
|
343 | histeditdefaultrevset = 'reverse(only(.) and not public() and not ::merge())' | |
|
344 | ||
|
345 | 343 | def desthistedit(ui, repo): |
|
346 | 344 | """Default base revision to edit for `hg histedit`.""" |
|
347 |
default = ui.config('histedit', 'defaultrev' |
|
|
348 | if default: | |
|
345 | default = ui.config('histedit', 'defaultrev') | |
|
346 | ||
|
347 | if default is None: | |
|
348 | revs = stack.getstack(repo) | |
|
349 | elif default: | |
|
349 | 350 | revs = scmutil.revrange(repo, [default]) |
|
350 | if revs: | |
|
351 | # The revset supplied by the user may not be in ascending order nor | |
|
352 | # take the first revision. So do this manually. | |
|
353 | revs.sort() | |
|
354 |
|
|
|
351 | ||
|
352 | if revs: | |
|
353 | # The revset supplied by the user may not be in ascending order nor | |
|
354 | # take the first revision. So do this manually. | |
|
355 | revs.sort() | |
|
356 | return revs.first() | |
|
355 | 357 | |
|
356 | 358 | return None |
|
357 | 359 |
General Comments 0
You need to be logged in to leave comments.
Login now