Mercurial > hg
comparison hgext/mq.py @ 11211:e43c23d189a5
push: add --new-branch option to allow intial push of new branches
Compare this to --force which allows anything to be pushed. With --new-branch,
only changesets to named branches not present on the and changesets not
introducing additional heads on existing branches are allowed.
Developed by
Henrik Stuart <henrik.stuart@edlund.dk>
Sune Foldager <cryo@cyanite.org>
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Fri, 21 May 2010 15:22:29 +0200 |
parents | 4b1f4e473c17 |
children | 1abd9442727c |
comparison
equal
deleted
inserted
replaced
11210:0c0088881562 | 11211:e43c23d189a5 |
---|---|
2553 force) | 2553 force) |
2554 | 2554 |
2555 return super(mqrepo, self).commit(text, user, date, match, force, | 2555 return super(mqrepo, self).commit(text, user, date, match, force, |
2556 editor, extra) | 2556 editor, extra) |
2557 | 2557 |
2558 def push(self, remote, force=False, revs=None): | 2558 def push(self, remote, force=False, revs=None, newbranch=False): |
2559 if self.mq.applied and not force and not revs: | 2559 if self.mq.applied and not force and not revs: |
2560 raise util.Abort(_('source has mq patches applied')) | 2560 raise util.Abort(_('source has mq patches applied')) |
2561 return super(mqrepo, self).push(remote, force, revs) | 2561 return super(mqrepo, self).push(remote, force, revs, newbranch) |
2562 | 2562 |
2563 def _findtags(self): | 2563 def _findtags(self): |
2564 '''augment tags from base class with patch tags''' | 2564 '''augment tags from base class with patch tags''' |
2565 result = super(mqrepo, self)._findtags() | 2565 result = super(mqrepo, self)._findtags() |
2566 | 2566 |