tests/test-username-newline.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 49621 55c6ebd11cb9
permissions -rw-r--r--
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.
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