Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 17169:c18ecebed3f1
push: refuse to push obsolete changesets
This is a first version. Simple but not very efficient.
Note that this changeset introduce the "obsolete" word in the UI.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 10 Jul 2012 01:32:18 +0200 |
parents | be016e96117a |
children | 12fdaa30063a |
comparison
equal
deleted
inserted
replaced
17168:e058f4eec69c | 17169:c18ecebed3f1 |
---|---|
1735 scmutil.nochangesfound(self.ui, outgoing.excluded) | 1735 scmutil.nochangesfound(self.ui, outgoing.excluded) |
1736 ret = None | 1736 ret = None |
1737 else: | 1737 else: |
1738 # something to push | 1738 # something to push |
1739 if not force: | 1739 if not force: |
1740 # if self.obsstore == False --> no obsolete | |
1741 # then, save the iteration | |
1742 if self.obsstore: | |
1743 # this message are here for 80 char limit reason | |
1744 msg = _("push includes an obsolete changeset: %s!") | |
1745 for node in outgoing.missing: | |
1746 ctx = self[node] | |
1747 if ctx.obsolete(): | |
1748 raise util.Abort(msg % ctx) | |
1740 discovery.checkheads(self, remote, outgoing, | 1749 discovery.checkheads(self, remote, outgoing, |
1741 remoteheads, newbranch, | 1750 remoteheads, newbranch, |
1742 bool(inc)) | 1751 bool(inc)) |
1743 | 1752 |
1744 # create a changegroup from local | 1753 # create a changegroup from local |