tests/test-copy.t
author Mads Kiilerich <mads@kiilerich.com>
Sun, 17 Oct 2010 04:14:06 +0200
changeset 12742 6ab4a7d3c179
parent 12156 4c94b6d0fb1c
child 13962 8b252e826c68
permissions -rw-r--r--
url: validity (notBefore/notAfter) is checked by OpenSSL (issue2407) Removing the check from our code makes https with cacerts check work with Python < 2.6.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     1
  $ hg init
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     2
  $ echo a > a
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     3
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
     4
  $ hg commit -m "1"
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     5
  $ hg status
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     6
  $ hg copy a b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     7
  $ hg status
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     8
  A b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
     9
  $ hg sum
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    10
  parent: 0:c19d34741b0a tip
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    11
   1
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    12
  branch: default
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    13
  commit: 1 copied
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    14
  update: (current)
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    15
  $ hg --debug commit -m "2"
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    16
  b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    17
   b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    18
  committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    19
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    20
we should see two history entries
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    21
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    22
  $ hg history -v
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    23
  changeset:   1:93580a2c28a5
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    24
  tag:         tip
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    25
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    26
  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
    27
  files:       b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    28
  description:
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    29
  2
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    30
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    31
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    32
  changeset:   0:c19d34741b0a
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    33
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    34
  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
    35
  files:       a
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    36
  description:
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    37
  1
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    38
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    39
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    40
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    41
we should see one log entry for a
363
ae96b7e1318d Add hg copy
mpm@selenic.com
parents:
diff changeset
    42
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    43
  $ hg log a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    44
  changeset:   0:c19d34741b0a
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    45
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    46
  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
    47
  summary:     1
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    48
  
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    49
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    50
this should show a revision linked to changeset 0
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    51
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    52
  $ hg debugindex .hg/store/data/a.i
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    53
     rev    offset  length   base linkrev nodeid       p1           p2
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    54
       0         0       3      0       0 b789fdd96dc2 000000000000 000000000000
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
we should see one log entry for b
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    57
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    58
  $ hg log b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    59
  changeset:   1:93580a2c28a5
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    60
  tag:         tip
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    61
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11805
diff changeset
    62
  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
    63
  summary:     2
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
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    66
this should show a revision linked to changeset 1
1043
9344f5dd4488 Update tests
mpm@selenic.com
parents: 814
diff changeset
    67
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    68
  $ hg debugindex .hg/store/data/b.i
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    69
     rev    offset  length   base linkrev nodeid       p1           p2
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    70
       0         0      65      0       1 37d9b5d994ea 000000000000 000000000000
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
this should show the rename information in the metadata
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    73
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    74
  $ hg debugdata .hg/store/data/b.d 0 | head -3 | tail -2
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    75
  copy: a
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    76
  copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
1043
9344f5dd4488 Update tests
mpm@selenic.com
parents: 814
diff changeset
    77
11805
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    78
  $ $TESTDIR/md5sum.py .hg/store/data/b.i
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    79
  4999f120a3b88713bbefddd195cf5133  .hg/store/data/b.i
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    80
  $ hg cat b > bsum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    81
  $ $TESTDIR/md5sum.py bsum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    82
  60b725f10c9c85c70d97880dfe8191b3  bsum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    83
  $ hg cat a > asum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    84
  $ $TESTDIR/md5sum.py asum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    85
  60b725f10c9c85c70d97880dfe8191b3  asum
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    86
  $ hg verify
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    87
  checking changesets
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    88
  checking manifests
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    89
  crosschecking files in changesets and manifests
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    90
  checking files
8ef250726cf0 tests: unify test-copy
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11331
diff changeset
    91
  2 files, 2 changesets, 2 total revisions