tests/test-username-newline.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Mar 2024 11:38:28 +0100
changeset 51597 b4a6a1ff8fce
parent 49621 55c6ebd11cb9
permissions -rw-r--r--
tags-cache: skip the filternode step if we are not going to use it When warming the hgtagsfnodescache, we don't need the actual result, so we can simply skip the part that "filter" fnode we read from the cache. So provide a quite visible speed up to the top level `hg debugupdatecache` function. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.debug.debug-update-cache # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.pre-state = warm before: 19.947581 after: 18.916804 (-5.17%, -1.03)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49621
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 46116
diff changeset
     1
  $ hg init repo
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 46116
diff changeset
     2
  $ cd repo
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
     3
  $ touch a
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     4
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
     5
  $ unset HGUSER
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
     6
  $ echo "[ui]" >> .hg/hgrc
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
     7
  $ echo "username= foo" >> .hg/hgrc
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
     8
  $ echo "          bar1" >> .hg/hgrc
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     9
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    10
  $ hg ci -Am m
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    11
  adding a
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    12
  abort: username 'foo\nbar1' contains a newline
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    13
  
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12301
diff changeset
    14
  [255]
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    15
  $ rm .hg/hgrc
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    16
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    17
  $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
33617
5ac845ca059a commit: don't let failed commit with --addremove update dirstate (issue5645)
Martin von Zweigbergk <martinvonz@google.com>
parents: 12346
diff changeset
    18
  adding a
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    19
  abort: username 'foo\nbar2' contains a newline
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    20
  
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12301
diff changeset
    21
  [255]
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    22
  $ hg ci -Am m -u "`(echo foo; echo bar3)`"
33617
5ac845ca059a commit: don't let failed commit with --addremove update dirstate (issue5645)
Martin von Zweigbergk <martinvonz@google.com>
parents: 12346
diff changeset
    23
  adding a
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    24
  transaction abort!
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
    25
  rollback completed
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 33617
diff changeset
    26
  abort: username 'foo\nbar3' contains a newline
46116
17a695357270 errors: use detailed exit code 50 for StorageError
Martin von Zweigbergk <martinvonz@google.com>
parents: 45906
diff changeset
    27
  [50]
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    28