Show More
@@ -359,7 +359,7 b' def desthistedit(ui, repo):' | |||
|
359 | 359 | |
|
360 | 360 | def stackbase(ui, repo): |
|
361 | 361 | revs = stack.getstack(repo) |
|
362 |
return revs. |
|
|
362 | return revs.first() if revs else None | |
|
363 | 363 | |
|
364 | 364 | def _statusotherbook(ui, repo): |
|
365 | 365 | bmheads = bookmarks.headsforactive(repo) |
@@ -13,8 +13,8 b' from . import (' | |||
|
13 | 13 | ) |
|
14 | 14 | |
|
15 | 15 | def getstack(repo, rev=None): |
|
16 |
"""return a smartrev of the stack containing either rev if it is |
|
|
17 | or the current working directory parent. | |
|
16 | """return a sorted smartrev of the stack containing either rev if it is | |
|
17 | not None or the current working directory parent. | |
|
18 | 18 | |
|
19 | 19 | The stack will always contain all drafts changesets which are ancestors to |
|
20 | 20 | the revision and are not merges. |
@@ -24,4 +24,6 b' def getstack(repo, rev=None):' | |||
|
24 | 24 | |
|
25 | 25 | revspec = 'reverse(only(%s) and not public() and not ::merge())' |
|
26 | 26 | revset = revsetlang.formatspec(revspec, rev) |
|
27 |
re |
|
|
27 | revisions = scmutil.revrange(repo, [revset]) | |
|
28 | revisions.sort() | |
|
29 | return revisions |
@@ -205,13 +205,13 b' Test output' | |||
|
205 | 205 | ~ |
|
206 | 206 | Check the stack order |
|
207 | 207 | $ hg log -r "first(stack())" |
|
208 |
|
|
|
208 | 9 foo draft c_g | |
|
209 | 209 | $ hg log -r "first(stack(10))" |
|
210 |
|
|
|
210 | 9 foo draft c_g | |
|
211 | 211 | $ hg log -r "first(stack(8))" |
|
212 |
|
|
|
212 | 7 foo draft c_e | |
|
213 | 213 | $ hg log -r "first(stack(head()))" |
|
214 |
|
|
|
214 | 7 foo draft c_e | |
|
215 | 215 | |
|
216 | 216 | Case with multiple heads with unstability involved |
|
217 | 217 | -------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now