import: warn about new unstable changesets
authorDan Villiom Podlaski Christiansen <dan@cabo.dk>
Thu, 24 Oct 2013 10:42:50 +0200
changeset 763 966e2659e989
parent 762 942aabaa8a8e
child 775 0961a7eb82c4
import: warn about new unstable changesets 'hg import' can add new unstable changesets, for example when invoked with '--hidden' or '--exact', or when the working directory parent already is unstable.
README
hgext/evolve.py
tests/test-obsolete.t
--- a/README	Tue Oct 22 11:16:55 2013 +0200
+++ b/README	Thu Oct 24 10:42:50 2013 +0200
@@ -49,6 +49,7 @@
 - removed the qsync extension. The only user I knew about (logilab) is not
   using it anymore. It not compatible with coming Mercurial version 2.9.
 - add progress indicator for long evolve command
+- report troubles creation from `hg import`
 
 3.2.0 -- 2013-11-15
 
--- a/hgext/evolve.py	Tue Oct 22 11:16:55 2013 +0200
+++ b/hgext/evolve.py	Thu Oct 24 10:42:50 2013 +0200
@@ -569,6 +569,7 @@
 # XXX this could wrap transaction code
 # XXX (but this is a bit a layer violation)
 @eh.wrapcommand("commit")
+@eh.wrapcommand("import")
 @eh.wrapcommand("push")
 @eh.wrapcommand("pull")
 @eh.wrapcommand("graft")
--- a/tests/test-obsolete.t	Tue Oct 22 11:16:55 2013 +0200
+++ b/tests/test-obsolete.t	Thu Oct 24 10:42:50 2013 +0200
@@ -678,3 +678,12 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     add c
   
+
+Check import reports new unstable changeset:
+
+  $ hg up --hidden 2
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  working directory parent is obsolete!
+  $ hg export 9468a5f5d8b2 | hg import -
+  applying patch from stdin
+  1 new unstable changesets