diff tests/test-subrepo-svn.t @ 16529:3d5d204a08c7 stable

subrepo/svn: abort on commit with missing file (issue3029) Previous code was printing a traceback because it expected some error output from svn. But sometimes our definition of "changed" differs with the subversion one. For instance, subversion ignores missing files when committing. And when there are only missing files, svn commit will be a successful no-op with no output. Still, we should stick to our definition including missing files in changes as doing otherwise could cause surprising behaviour for the user.
author Patrick Mezard <patrick@mezard.eu>
date Thu, 26 Apr 2012 11:55:07 +0200
parents 17a1f7690b49
children e37199a1f9d4
line wrap: on
line diff
--- a/tests/test-subrepo-svn.t	Thu Apr 26 21:32:48 2012 +0900
+++ b/tests/test-subrepo-svn.t	Thu Apr 26 11:55:07 2012 +0200
@@ -120,6 +120,15 @@
    source   file://*/svn-repo/src (glob)
    revision 2
 
+missing svn file, commit should fail
+
+  $ rm s/alpha
+  $ hg commit --subrepos -m 'abort on missing file'
+  committing subrepository s
+  abort: failed to commit svn changes
+  [255]
+  $ svn revert s/alpha > /dev/null
+
 add an unrelated revision in svn and update the subrepo to without
 bringing any changes.