Comments
Patch
@@ -1436,11 +1436,14 @@
try:
if opts.get('secret'):
ui.setconfig('phases', 'new-commit', 'secret')
+ # Propagate to subrepos
+ repo.baseui.setconfig('phases', 'new-commit', 'secret')
return repo.commit(message, opts.get('user'), opts.get('date'),
match, editor=e, extra=extra)
finally:
ui.setconfig('phases', 'new-commit', oldcommitphase)
+ repo.baseui.setconfig('phases', 'new-commit', oldcommitphase)
node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
@@ -185,6 +185,12 @@
$ hg commit --subrepos -m 2-3-2
committing subrepository foo
committing subrepository foo/bar (glob)
+ $ hg phase -r .
+ 2: draft
+ $ hg -R foo phase -r .
+ 3: draft
+ $ hg -R foo/bar phase -r .
+ 2: draft
Test explicit path commands within subrepos: add/forget
$ echo z1 > foo/bar/z2.txt
@@ -1294,3 +1294,16 @@
15: secret
$ cd ..
+
+Test that comit --secret works (issue4182)
+
+ $ cd main
+ $ echo secret >> b
+ $ echo secret >> s/b
+ $ hg commit --secret --subrepo -m "secret"
+ committing subrepository s
+ $ hg phase -r .
+ 6: secret
+ $ hg -R s phase -r .
+ 6: secret
+ $ cd ..