diff tests/test-obsolete.t @ 17834:743d04dd48ec

push: refuse to push bumped changeset This applies the same logic as used for `obsolete` and `unstable` changesets. Refuse to push them without force. We'll probably want to factor this logic with two new functions `pctx.troubled()` and `ctx.troubles()`. But I'm waiting for the third "trouble" to make it into core.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Fri, 19 Oct 2012 00:50:12 +0200
parents 0c1185f6ddd7
children 42f56a0418b3
line wrap: on
line diff
--- a/tests/test-obsolete.t	Fri Oct 19 00:46:39 2012 +0200
+++ b/tests/test-obsolete.t	Fri Oct 19 00:50:12 2012 +0200
@@ -171,6 +171,14 @@
   summary:     add new_3_c
   
 
+And that we can't push bumped changeset
+
+  $ hg push ../tmpa
+  pushing to ../tmpa
+  searching for changes
+  abort: push includes bumped changeset: 5601fb93a350!
+  [255]
+
 Fixing "bumped" situation
 We need to create a clone of 5 and add a special marker with a flag