diff tests/test-subrepo-git.t @ 15321:e174353e8cda stable

subrepos: abort commit by default if a subrepo is dirty (BC) This changeset flips the default value of ui.commitsubrepos setting from True to False and adds a --subrepos flag to commit. The commit, status, and diff commands behave like this with regard to recusion and the ui.commitsubrepos setting: | recurses | recurses | by default | with --subrepos --------+---------------+---------------- commit: | commitsubrepo | True status: | False | True diff: | False | True By changing the default from True to False, the table becomes consistent in the two columns: * without --subrepos on the command line, commit will abort if a subrepo is dirty and status/diff wont show changes inside subrepos. * with --subrepos, all three commands will recurse. A --subrepos flag on the command line overrides the config settin.g
author Martin Geisler <mg@lazybytes.net>
date Fri, 21 Oct 2011 00:33:08 +0200
parents b2ee161328e0
children 0810ccc51f0a
line wrap: on
line diff
--- a/tests/test-subrepo-git.t	Thu Oct 20 17:05:13 2011 -0400
+++ b/tests/test-subrepo-git.t	Fri Oct 21 00:33:08 2011 +0200
@@ -103,7 +103,7 @@
   $ echo ggg >> s/g
   $ hg status --subrepos
   M s/g
-  $ hg commit -m ggg
+  $ hg commit --subrepos -m ggg
   committing subrepository s
   $ hg debugsub
   path s
@@ -125,7 +125,7 @@
 
   $ hg status --subrepos
   A s/f
-  $ hg commit -m f
+  $ hg commit --subrepos -m f
   committing subrepository s
   $ hg debugsub
   path s
@@ -164,7 +164,7 @@
   g
   gg
   ggg
-  $ hg commit -m 'merge'
+  $ hg commit --subrepos -m 'merge'
   committing subrepository s
   $ hg status --subrepos --rev 1:5
   M .hgsubstate
@@ -294,7 +294,7 @@
   $ echo ffff >> inner/s/f
   $ hg status --subrepos
   M inner/s/f
-  $ hg commit -m nested
+  $ hg commit --subrepos -m nested
   committing subrepository inner
   committing subrepository inner/s
 
@@ -325,7 +325,7 @@
   $ hg push -q
   abort: subrepo s is missing
   [255]
-  $ hg commit -qm missing
+  $ hg commit --subrepos -qm missing
   abort: subrepo s is missing
   [255]
   $ hg update -C