comparison hgext/mq.py @ 18011:4908197d7422

clfilter: mq should not warn about filtered mq patches MQ warns when qstatus contains unknown nodes. With changelog filtering, a node may be unknown because it is filtered. Thus, an unfiltered repo is used for this check.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 08 Oct 2012 20:01:40 +0200
parents 38b51a60a195
children b35e3364f94a
comparison
equal deleted inserted replaced
18010:38b51a60a195 18011:4908197d7422
3451 return result 3451 return result
3452 3452
3453 mqtags = [(patch.node, patch.name) for patch in q.applied] 3453 mqtags = [(patch.node, patch.name) for patch in q.applied]
3454 3454
3455 try: 3455 try:
3456 self.changelog.rev(mqtags[-1][0]) 3456 # for now ignore filtering business
3457 self.unfiltered().changelog.rev(mqtags[-1][0])
3457 except error.LookupError: 3458 except error.LookupError:
3458 self.ui.warn(_('mq status file refers to unknown node %s\n') 3459 self.ui.warn(_('mq status file refers to unknown node %s\n')
3459 % short(mqtags[-1][0])) 3460 % short(mqtags[-1][0]))
3460 return result 3461 return result
3461 3462
3481 # Committing a new patch, must be tip 3482 # Committing a new patch, must be tip
3482 qbase = len(cl) - 1 3483 qbase = len(cl) - 1
3483 else: 3484 else:
3484 qbasenode = q.applied[0].node 3485 qbasenode = q.applied[0].node
3485 try: 3486 try:
3486 qbase = cl.rev(qbasenode) 3487 qbase = self.unfiltered().changelog.rev(qbasenode)
3487 except error.LookupError: 3488 except error.LookupError:
3488 self.ui.warn(_('mq status file refers to unknown node %s\n') 3489 self.ui.warn(_('mq status file refers to unknown node %s\n')
3489 % short(qbasenode)) 3490 % short(qbasenode))
3490 if qbase is None: 3491 if qbase is None:
3491 return super(mqrepo, self)._branchtags(partial, lrev) 3492 return super(mqrepo, self)._branchtags(partial, lrev)