tests/test-revert-unknown.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 05 Apr 2024 14:11:02 +0200
changeset 51583 22cc679a7312
parent 49621 55c6ebd11cb9
permissions -rw-r--r--
phases: move RemotePhasesSummary to revision number This continue our quest to align more logic on revision number instead of node-ids. The motivation is similar to the change to `new_heads` and `analyze_remote_phases` a few changeset earlier. Again, we take this as an opportunity to rename the class, and the attribute to the new naming scheme. This will highlight the need for code update for any code using it an expecting node-ids. Many of the rev-num → node-id conversion we had to introduce in the previous changesets can now be removed. More will be removed in the future as we continue to align code toward rev-num usage. time saved in the 100 milliseconds order of magnitude for the mozilla-try benchmark I have been using.
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: 44724
diff changeset
     1
  $ hg init repo
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 44724
diff changeset
     2
  $ cd repo
12111
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
     3
  $ touch unknown
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
     4
12111
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
     5
  $ touch a
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
     6
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12111
diff changeset
     7
  $ hg ci -m "1"
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
     8
12111
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
     9
  $ touch b
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    10
  $ hg add b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12111
diff changeset
    11
  $ hg ci -m "2"
12111
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    12
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    13
Should show unknown
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
    14
12111
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    15
  $ hg status
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    16
  ? unknown
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    17
  $ hg revert -r 0 --all
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    18
  removing b
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    19
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    20
Should show unknown and b removed
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
    21
12111
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    22
  $ hg status
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    23
  R b
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    24
  ? unknown
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    25
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    26
Should show a and unknown
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    27
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 12156
diff changeset
    28
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 12156
diff changeset
    29
  .hg
12111
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    30
  a
327dee7f7327 tests: unify test-revert-unknown
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 2982
diff changeset
    31
  unknown