changeset 763:966e2659e989

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.
author Dan Villiom Podlaski Christiansen <dan@cabo.dk>
date Thu, 24 Oct 2013 10:42:50 +0200
parents 942aabaa8a8e
children 0961a7eb82c4
files README hgext/evolve.py tests/test-obsolete.t
diffstat 3 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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