mercurial/localrepo.py
changeset 17169 c18ecebed3f1
parent 17161 be016e96117a
child 17172 12fdaa30063a
--- a/mercurial/localrepo.py	Thu Jul 05 19:53:04 2012 +0200
+++ b/mercurial/localrepo.py	Tue Jul 10 01:32:18 2012 +0200
@@ -1737,6 +1737,15 @@
                 else:
                     # something to push
                     if not force:
+                        # if self.obsstore == False --> no obsolete
+                        # then, save the iteration
+                        if self.obsstore:
+                            # this message are here for 80 char limit reason
+                            msg = _("push includes an obsolete changeset: %s!")
+                            for node in outgoing.missing:
+                                ctx = self[node]
+                                if ctx.obsolete():
+                                    raise util.Abort(msg % ctx)
                         discovery.checkheads(self, remote, outgoing,
                                              remoteheads, newbranch,
                                              bool(inc))