tests/test-addremove.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Sat, 29 Dec 2012 18:00:18 +0100
branchstable
changeset 18197 153659e86a5f
parent 16912 6ef3107c661e
child 23259 9f4778027bc2
permissions -rw-r--r--
amend: invalidate dirstate in case of failure (issue3670) The temporary commit created by amend update the dirstate. If the final commit fails, we need to invalidate the change made to the dirstate, otherwise the release of the wlock will write the dirstate created after the rollbacked temporary commit. This dirstate writing logic should probably be handled in the same object than the transaction one. However such change are too big for stable.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11850
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     1
  $ hg init rep
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     2
  $ cd rep
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     3
  $ mkdir dir
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     4
  $ touch foo dir/bar
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     5
  $ hg -v addremove
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     6
  adding dir/bar
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     7
  adding foo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11850
diff changeset
     8
  $ hg -v commit -m "add 1"
11850
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
     9
  dir/bar
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    10
  foo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11850
diff changeset
    11
  committed changeset 0:6f7f953567a2
11850
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    12
  $ cd dir/
16874
8017ac7a0e8f test-addremove: remove bits about con.xml
Adrian Buehlmann <adrian@cadifra.com>
parents: 15444
diff changeset
    13
  $ touch ../foo_2 bar_2
11850
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    14
  $ hg -v addremove
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    15
  adding dir/bar_2
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    16
  adding foo_2
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11850
diff changeset
    17
  $ hg -v commit -m "add 2"
11850
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    18
  dir/bar_2
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    19
  foo_2
16874
8017ac7a0e8f test-addremove: remove bits about con.xml
Adrian Buehlmann <adrian@cadifra.com>
parents: 15444
diff changeset
    20
  committed changeset 1:e65414bf35c5
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16874
diff changeset
    21
  $ cd ../..
2958
ff3ea21a981a addremove: add -s/--similarity option
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1933
diff changeset
    22
11850
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    23
  $ hg init sim
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    24
  $ cd sim
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    25
  $ echo a > a
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    26
  $ echo a >> a
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    27
  $ echo a >> a
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    28
  $ echo c > c
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    29
  $ hg commit -Ama
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    30
  adding a
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    31
  adding c
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    32
  $ mv a b
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    33
  $ rm c
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    34
  $ echo d > d
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    35
  $ hg addremove -n -s 50 # issue 1696
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    36
  removing a
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    37
  adding b
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    38
  removing c
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    39
  adding d
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    40
  recording removal of a as rename to b (100% similar)
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    41
  $ hg addremove -s 50
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    42
  removing a
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    43
  adding b
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    44
  removing c
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    45
  adding d
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    46
  recording removal of a as rename to b (100% similar)
54dbf16b401f tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents: 8990
diff changeset
    47
  $ hg commit -mb
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16874
diff changeset
    48
  $ cd ..