##// END OF EJS Templates
subrepos: abort commit by default if a subrepo is dirty (BC)...
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

File last commit:

r12375:02990e22 default
r15321:e174353e stable
Show More
test-committer.t
63 lines | 1.5 KiB | text/troff | Tads3Lexer
Nicolas Dumazet
tests: unify test-committer
r11801 $ unset HGUSER
$ EMAIL="My Name <myname@example.com>"
$ export EMAIL
$ hg init test
$ cd test
$ touch asdf
$ hg add asdf
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m commit-1
Nicolas Dumazet
tests: unify test-committer
r11801 $ hg tip
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:53f268a58230
Nicolas Dumazet
tests: unify test-committer
r11801 tag: tip
user: My Name <myname@example.com>
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-committer
r11801 summary: commit-1
$ unset EMAIL
$ echo 1234 > asdf
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -u "foo@bar.com" -m commit-1
Nicolas Dumazet
tests: unify test-committer
r11801 $ hg tip
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:3871b2a9e9bf
Nicolas Dumazet
tests: unify test-committer
r11801 tag: tip
user: foo@bar.com
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-committer
r11801 summary: commit-1
$ echo "[ui]" >> .hg/hgrc
$ echo "username = foobar <foo@bar.com>" >> .hg/hgrc
$ echo 12 > asdf
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m commit-1
Nicolas Dumazet
tests: unify test-committer
r11801 $ hg tip
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 2:8eeac6695c1c
Nicolas Dumazet
tests: unify test-committer
r11801 tag: tip
user: foobar <foo@bar.com>
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-committer
r11801 summary: commit-1
$ echo 1 > asdf
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -u "foo@bar.com" -m commit-1
Nicolas Dumazet
tests: unify test-committer
r11801 $ hg tip
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 3:957606a725e4
Nicolas Dumazet
tests: unify test-committer
r11801 tag: tip
user: foo@bar.com
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-committer
r11801 summary: commit-1
$ echo 123 > asdf
$ echo "[ui]" > .hg/hgrc
$ echo "username = " >> .hg/hgrc
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m commit-1
Nicolas Dumazet
tests: unify test-committer
r11801 abort: no username supplied (see "hg help config")
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-committer
r11801 $ rm .hg/hgrc
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m commit-1 2>&1
Brodie Rao
tests: require regexes in unified tests to be marked with " (re)"...
r12375 No username found, using '[^']*' instead (re)
Nicolas Dumazet
tests: unify test-committer
r11801
$ echo space > asdf
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -u ' ' -m commit-1
Nicolas Dumazet
tests: unify test-committer
r11801 transaction abort!
rollback completed
abort: empty username!
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]