2711 |
2711 |
2712 return super(mqrepo, self).commit(text, user, date, match, force, |
2712 return super(mqrepo, self).commit(text, user, date, match, force, |
2713 editor, extra) |
2713 editor, extra) |
2714 |
2714 |
2715 def push(self, remote, force=False, revs=None, newbranch=False): |
2715 def push(self, remote, force=False, revs=None, newbranch=False): |
2716 if self.mq.applied and not force and not revs: |
2716 if self.mq.applied and not force: |
2717 raise util.Abort(_('source has mq patches applied')) |
2717 haspatches = True |
|
2718 if revs: |
|
2719 # Assume applied patches have no non-patch descendants |
|
2720 # and are not on remote already. If they appear in the |
|
2721 # set of resolved 'revs', bail out. |
|
2722 applied = set(e.node for e in self.mq.applied) |
|
2723 haspatches = bool([n for n in revs if n in applied]) |
|
2724 if haspatches: |
|
2725 raise util.Abort(_('source has mq patches applied')) |
2718 return super(mqrepo, self).push(remote, force, revs, newbranch) |
2726 return super(mqrepo, self).push(remote, force, revs, newbranch) |
2719 |
2727 |
2720 def _findtags(self): |
2728 def _findtags(self): |
2721 '''augment tags from base class with patch tags''' |
2729 '''augment tags from base class with patch tags''' |
2722 result = super(mqrepo, self)._findtags() |
2730 result = super(mqrepo, self)._findtags() |