hgext/mq.py
changeset 8152 08e1baf924ca
parent 8151 127281884959
child 8188 f3abe032fc89
equal deleted inserted replaced
8151:127281884959 8152:08e1baf924ca
  1336                 msg = msg and ': ' + msg[0] or ': '
  1336                 msg = msg and ': ' + msg[0] or ': '
  1337             else:
  1337             else:
  1338                 msg = ''
  1338                 msg = ''
  1339             return '%s%s' % (patchname, msg)
  1339             return '%s%s' % (patchname, msg)
  1340 
  1340 
  1341         applied = dict.fromkeys([p.name for p in self.applied])
  1341         applied = set([p.name for p in self.applied])
  1342         if length is None:
  1342         if length is None:
  1343             length = len(self.series) - start
  1343             length = len(self.series) - start
  1344         if not missing:
  1344         if not missing:
  1345             for i in xrange(start, start+length):
  1345             for i in xrange(start, start+length):
  1346                 patch = self.series[i]
  1346                 patch = self.series[i]
  1760     qbase, destrev = None, None
  1760     qbase, destrev = None, None
  1761     if sr.local():
  1761     if sr.local():
  1762         if sr.mq.applied:
  1762         if sr.mq.applied:
  1763             qbase = bin(sr.mq.applied[0].rev)
  1763             qbase = bin(sr.mq.applied[0].rev)
  1764             if not hg.islocal(dest):
  1764             if not hg.islocal(dest):
  1765                 heads = dict.fromkeys(sr.heads())
  1765                 heads = set(sr.heads())
  1766                 for h in sr.heads(qbase):
  1766                 destrev = list(heads.difference(sr.heads(qbase)))
  1767                     del heads[h]
       
  1768                 destrev = heads.keys()
       
  1769                 destrev.append(sr.changelog.parents(qbase)[0])
  1767                 destrev.append(sr.changelog.parents(qbase)[0])
  1770     elif sr.capable('lookup'):
  1768     elif sr.capable('lookup'):
  1771         try:
  1769         try:
  1772             qbase = sr.lookup('qbase')
  1770             qbase = sr.lookup('qbase')
  1773         except error.RepoError:
  1771         except error.RepoError: