##// END OF EJS Templates
mq: fix qtop failure when the series ends with guarded patches.
Patrick Mezard -
r4406:f700ea2b default
parent child Browse files
Show More
@@ -1264,6 +1264,10 b' class queue:'
1264 return 0
1264 return 0
1265
1265
1266 def series_end(self, all_patches=False):
1266 def series_end(self, all_patches=False):
1267 """If all_patches is False, return the index of the next pushable patch
1268 in the series, or the series length. If all_patches is True, return the
1269 index of the first patch past the last applied one.
1270 """
1267 end = 0
1271 end = 0
1268 def next(start):
1272 def next(start):
1269 if all_patches:
1273 if all_patches:
@@ -1547,7 +1551,7 b' def series(ui, repo, **opts):'
1547 def top(ui, repo, **opts):
1551 def top(ui, repo, **opts):
1548 """print the name of the current patch"""
1552 """print the name of the current patch"""
1549 q = repo.mq
1553 q = repo.mq
1550 t = q.series_end()
1554 t = q.applied and q.series_end(True) or 0
1551 if t:
1555 if t:
1552 return q.qseries(repo, start=t-1, length=1, status='A',
1556 return q.qseries(repo, start=t-1, length=1, status='A',
1553 summary=opts.get('summary'))
1557 summary=opts.get('summary'))
General Comments 0
You need to be logged in to leave comments. Login now