hgext/mq.py
changeset 12380 1e2625fe371b
parent 12355 2935cb0ab4e9
parent 12378 ab237534d800
child 12389 4ac734b9b3fd
equal deleted inserted replaced
12377:a5b77eb0409b 12380:1e2625fe371b
  2795 
  2795 
  2796             return super(mqrepo, self).commit(text, user, date, match, force,
  2796             return super(mqrepo, self).commit(text, user, date, match, force,
  2797                                               editor, extra)
  2797                                               editor, extra)
  2798 
  2798 
  2799         def push(self, remote, force=False, revs=None, newbranch=False):
  2799         def push(self, remote, force=False, revs=None, newbranch=False):
  2800             if self.mq.applied and not force and not revs:
  2800             if self.mq.applied and not force:
  2801                 raise util.Abort(_('source has mq patches applied'))
  2801                 haspatches = True
       
  2802                 if revs:
       
  2803                     # Assume applied patches have no non-patch descendants
       
  2804                     # and are not on remote already. If they appear in the
       
  2805                     # set of resolved 'revs', bail out.
       
  2806                     applied = set(e.node for e in self.mq.applied)
       
  2807                     haspatches = bool([n for n in revs if n in applied])
       
  2808                 if haspatches:
       
  2809                     raise util.Abort(_('source has mq patches applied'))
  2802             return super(mqrepo, self).push(remote, force, revs, newbranch)
  2810             return super(mqrepo, self).push(remote, force, revs, newbranch)
  2803 
  2811 
  2804         def _findtags(self):
  2812         def _findtags(self):
  2805             '''augment tags from base class with patch tags'''
  2813             '''augment tags from base class with patch tags'''
  2806             result = super(mqrepo, self)._findtags()
  2814             result = super(mqrepo, self)._findtags()