tests/test-copy.t
author Simon Heimberg <simohe@besonet.ch>
Thu, 16 Jan 2014 18:55:35 +0100
changeset 20258 3cd441353d6b
parent 17492 973c2b0b403c
child 23285 6cc1f388ac80
permissions -rw-r--r--
run-tests: report tests as failed when run-test raises an error Before no message was returned to the main thread. No result was registered and no new thread was started. This does not happen when running normal. But when fiddling around with the test infrastructure, this helps a lot.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16856
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
     1
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
     2
  $ mkdir part1
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
     3
  $ cd part1
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
     4
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     5
  $ hg init
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     6
  $ echo a > a
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     7
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
     8
  $ hg commit -m "1"
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     9
  $ hg status
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    10
  $ hg copy a b
13962
8b252e826c68 add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
    11
  $ hg --config ui.portablefilenames=abort copy a con.xml
8b252e826c68 add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
    12
  abort: filename contains 'con', which is reserved on Windows: 'con.xml'
8b252e826c68 add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
    13
  [255]
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    14
  $ hg status
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    15
  A b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    16
  $ hg sum
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    17
  parent: 0:c19d34741b0a tip
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    18
   1
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    19
  branch: default
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    20
  commit: 1 copied
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    21
  update: (current)
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    22
  $ hg --debug commit -m "2"
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    23
  b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    24
   b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    25
  committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    26
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    27
we should see two history entries
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    28
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    29
  $ hg history -v
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    30
  changeset:   1:93580a2c28a5
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    31
  tag:         tip
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    32
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    33
  date:        Thu Jan 01 00:00:00 1970 +0000
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    34
  files:       b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    35
  description:
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    36
  2
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    37
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    38
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    39
  changeset:   0:c19d34741b0a
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    40
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    41
  date:        Thu Jan 01 00:00:00 1970 +0000
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    42
  files:       a
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    43
  description:
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    44
  1
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    45
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    46
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    47
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    48
we should see one log entry for a
363
ae96b7e1318d Add hg copy
mpm@selenic.com
parents:
diff changeset
    49
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    50
  $ hg log a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    51
  changeset:   0:c19d34741b0a
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    52
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    53
  date:        Thu Jan 01 00:00:00 1970 +0000
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    54
  summary:     1
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    55
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    56
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    57
this should show a revision linked to changeset 0
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    58
14182
ec5886db9dc6 tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents: 13962
diff changeset
    59
  $ hg debugindex a
17132
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
    60
     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
    61
       0         0       3  .....       0 b789fdd96dc2 000000000000 000000000000 (re)
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    62
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    63
we should see one log entry for b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    64
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    65
  $ hg log b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    66
  changeset:   1:93580a2c28a5
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    67
  tag:         tip
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    68
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    69
  date:        Thu Jan 01 00:00:00 1970 +0000
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    70
  summary:     2
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    71
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    72
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    73
this should show a revision linked to changeset 1
1043
9344f5dd4488 Update tests
mpm@selenic.com
parents: 814
diff changeset
    74
14182
ec5886db9dc6 tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents: 13962
diff changeset
    75
  $ hg debugindex b
17132
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
    76
     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
    77
       0         0      65  .....       1 37d9b5d994ea 000000000000 000000000000 (re)
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    78
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    79
this should show the rename information in the metadata
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    80
14182
ec5886db9dc6 tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents: 13962
diff changeset
    81
  $ hg debugdata b 0 | head -3 | tail -2
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    82
  copy: a
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    83
  copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
1043
9344f5dd4488 Update tests
mpm@selenic.com
parents: 814
diff changeset
    84
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14182
diff changeset
    85
  $ "$TESTDIR/md5sum.py" .hg/store/data/b.i
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    86
  4999f120a3b88713bbefddd195cf5133  .hg/store/data/b.i
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    87
  $ hg cat b > bsum
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14182
diff changeset
    88
  $ "$TESTDIR/md5sum.py" bsum
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    89
  60b725f10c9c85c70d97880dfe8191b3  bsum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    90
  $ hg cat a > asum
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14182
diff changeset
    91
  $ "$TESTDIR/md5sum.py" asum
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    92
  60b725f10c9c85c70d97880dfe8191b3  asum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    93
  $ hg verify
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    94
  checking changesets
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    95
  checking manifests
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    96
  crosschecking files in changesets and manifests
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    97
  checking files
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    98
  2 files, 2 changesets, 2 total revisions
16856
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
    99
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   100
  $ cd ..
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   101
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   102
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   103
  $ mkdir part2
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   104
  $ cd part2
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   105
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   106
  $ hg init
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   107
  $ echo foo > foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   108
should fail - foo is not managed
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   109
  $ hg mv foo bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   110
  foo: not copying - file is not managed
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   111
  abort: no files to copy
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   112
  [255]
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   113
  $ hg st -A
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   114
  ? foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   115
  $ hg add foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   116
dry-run; print a warning that this is not a real copy; foo is added
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   117
  $ hg mv --dry-run foo bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   118
  foo has not been committed yet, so no copy data will be stored for bar.
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   119
  $ hg st -A
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   120
  A foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   121
should print a warning that this is not a real copy; bar is added
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   122
  $ hg mv foo bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   123
  foo has not been committed yet, so no copy data will be stored for bar.
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   124
  $ hg st -A
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   125
  A bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   126
should print a warning that this is not a real copy; foo is added
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   127
  $ hg cp bar foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   128
  bar has not been committed yet, so no copy data will be stored for foo.
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   129
  $ hg rm -f bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   130
  $ rm bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   131
  $ hg st -A
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   132
  A foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   133
  $ hg commit -m1
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   134
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   135
moving a missing file
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   136
  $ rm foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   137
  $ hg mv foo foo3
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   138
  foo: deleted in working copy
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   139
  foo3 does not exist!
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   140
  $ hg up -qC .
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   141
17492
973c2b0b403c spelling: nonexistent
timeless@mozdev.org
parents: 17132
diff changeset
   142
copy --after to a nonexistent target filename
16856
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   143
  $ hg cp -A foo dummy
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   144
  foo: not recording copy - dummy does not exist
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   145
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   146
dry-run; should show that foo is clean
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   147
  $ hg copy --dry-run foo bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   148
  $ hg st -A
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   149
  C foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   150
should show copy
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   151
  $ hg copy foo bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   152
  $ hg st -C
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   153
  A bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   154
    foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   155
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   156
shouldn't show copy
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   157
  $ hg commit -m2
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   158
  $ hg st -C
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   159
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   160
should match
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   161
  $ hg debugindex foo
17132
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   162
     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   163
       0         0       5  .....       0 2ed2a3912a0b 000000000000 000000000000 (re)
16856
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   164
  $ hg debugrename bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   165
  bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   166
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   167
  $ echo bleah > foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   168
  $ echo quux > bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   169
  $ hg commit -m3
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   170
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   171
should not be renamed
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   172
  $ hg debugrename bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   173
  bar not renamed
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   174
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   175
  $ hg copy -f foo bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   176
should show copy
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   177
  $ hg st -C
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   178
  M bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   179
    foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   180
  $ hg commit -m3
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   181
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   182
should show no parents for tip
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   183
  $ hg debugindex bar
17132
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   184
     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   185
       0         0      69  .....       1 7711d36246cc 000000000000 000000000000 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   186
       1        69       6  .....       2 bdf70a2b8d03 7711d36246cc 000000000000 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   187
       2        75      81  .....       3 b2558327ea8d 000000000000 000000000000 (re)
16856
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   188
should match
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   189
  $ hg debugindex foo
17132
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   190
     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   191
       0         0       5  .....       0 2ed2a3912a0b 000000000000 000000000000 (re)
b87acfda5268 tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents: 16913
diff changeset
   192
       1         5       7  .....       2 dd12c926cf16 2ed2a3912a0b 000000000000 (re)
16856
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   193
  $ hg debugrename bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   194
  bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   195
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   196
should show no copies
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   197
  $ hg st -C
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   198
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   199
copy --after on an added file
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   200
  $ cp bar baz
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   201
  $ hg add baz
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   202
  $ hg cp -A bar baz
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   203
  $ hg st -C
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   204
  A baz
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   205
    bar
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   206
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   207
foo was clean:
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   208
  $ hg st -AC foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   209
  C foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   210
but it's considered modified after a copy --after --force
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   211
  $ hg copy -Af bar foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   212
  $ hg st -AC foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   213
  M foo
241a32942c7a tests: roll test-copy2.t into test-copy.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 16350
diff changeset
   214
    bar
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16856
diff changeset
   215
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16856
diff changeset
   216
  $ cd ..