Show More
@@ -1388,31 +1388,30 b' def version(ui, q=None):' | |||||
1388 | return 0 |
|
1388 | return 0 | |
1389 |
|
1389 | |||
1390 | def reposetup(ui, repo): |
|
1390 | def reposetup(ui, repo): | |
1391 | repomap[repo] = queue(ui, repo.join("")) |
|
1391 | class MqRepo(repo.__class__): | |
1392 | oldtags = repo.tags |
|
1392 | def tags(self): | |
|
1393 | if self.tagscache: | |||
|
1394 | return self.tagscache | |||
|
1395 | ||||
|
1396 | tagscache = super(self.__class__, self).tags() | |||
1393 |
|
1397 | |||
1394 | def qtags(): |
|
1398 | q = repomap[repo] | |
1395 | if repo.tagscache: |
|
1399 | if not q.applied: | |
1396 |
return |
|
1400 | return tagscache | |
1397 |
|
1401 | |||
1398 | tagscache = oldtags() |
|
1402 | mqtags = [patch.split(':') for patch in q.applied] | |
|
1403 | mqtags.append((mqtags[-1][0], 'qtip')) | |||
|
1404 | mqtags.append((mqtags[0][0], 'qbase')) | |||
|
1405 | for patch in mqtags: | |||
|
1406 | if patch[1] in tagscache: | |||
|
1407 | self.ui.warn('Tag %s overrides mq patch of the same name\n' % patch[1]) | |||
|
1408 | else: | |||
|
1409 | tagscache[patch[1]] = revlog.bin(patch[0]) | |||
1399 |
|
1410 | |||
1400 | q = repomap[repo] |
|
|||
1401 | if len(q.applied) == 0: |
|
|||
1402 | return tagscache |
|
1411 | return tagscache | |
1403 |
|
1412 | |||
1404 | mqtags = [patch.split(':') for patch in q.applied] |
|
1413 | repo.__class__ = MqRepo | |
1405 | mqtags.append((mqtags[-1][0], 'qtip')) |
|
1414 | repomap[repo] = queue(ui, repo.join("")) | |
1406 | mqtags.append((mqtags[0][0], 'qbase')) |
|
|||
1407 | for patch in mqtags: |
|
|||
1408 | if patch[1] in tagscache: |
|
|||
1409 | repo.ui.warn('Tag %s overrides mq patch of the same name\n' % patch[1]) |
|
|||
1410 | else: |
|
|||
1411 | tagscache[patch[1]] = revlog.bin(patch[0]) |
|
|||
1412 |
|
||||
1413 | return tagscache |
|
|||
1414 |
|
||||
1415 | repo.tags = qtags |
|
|||
1416 |
|
1415 | |||
1417 | cmdtable = { |
|
1416 | cmdtable = { | |
1418 | "qapplied": (applied, [], 'hg qapplied [PATCH]'), |
|
1417 | "qapplied": (applied, [], 'hg qapplied [PATCH]'), |
General Comments 0
You need to be logged in to leave comments.
Login now