Commits

Pierre-Yves David  committed 23ef1c7

obsolete: detect late comer during push

  • Participants
  • Parent commits 9ac56d3
  • Branches default

Comments (0)

Files changed (2)

File hgext/obsolete.py

         if ctx.obsolete():
             raise util.Abort(_("Trying to push obsolete changeset: %s!") % ctx,
                              hint=hint)
+        if ctx.latecomer():
+            raise util.Abort(_("Trying to push latecomer changeset: %s!") % ctx,
+                             hint=hint)
     ### patch remote branch map
     # do not read it this burn eyes
     try:

File tests/test-obsolete.t

   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     add obsol_d'''
   
+  $ hg push ../other-new/
+  pushing to ../other-new/
+  searching for changes
+  abort: Trying to push latecomer changeset: 6db5e282cb91!
+  (use 'hg stabilize' to get a stable history (or --force to proceed))
+  [255]