tests/test-hardlinks.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 13 May 2017 21:30:02 -0400
changeset 32304 37bcb4665529
parent 32295 b9135f191d8a
child 32721 c2cb0de25120
permissions -rw-r--r--
tests: fix up recent conditionalized output changes It looks like (!) can have surprising results matching back to the original output when adjacent lines change, probably because it uses the same code matching that allows (?) to skip missing output. 24f55686a63d ended up adding unconditionalized check*{exec,link} lines, duplicating the conditionalized lines. A Windows run wanted to delete the unconditionalized lines. This now runs on both Windows and Linux.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 20185
diff changeset
     1
#require hardlink
16971
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16918
diff changeset
     2
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     3
  $ cat > nlinks.py <<EOF
16918
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
     4
  > import sys
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
     5
  > from mercurial import util
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     6
  > for f in sorted(sys.stdin.readlines()):
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     7
  >     f = f[:-1]
16918
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
     8
  >     print util.nlinks(f), f
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     9
  > EOF
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    10
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    11
  $ nlinksdir()
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    12
  > {
32294
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
    13
  >     find "$@" -type f | python $TESTTMP/nlinks.py
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    14
  > }
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    15
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    16
Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux):
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    17
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    18
  $ cat > linkcp.py <<EOF
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    19
  > from mercurial import util
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    20
  > import sys
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    21
  > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True)
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    22
  > EOF
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    23
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    24
  $ linkcp()
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    25
  > {
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    26
  >     python $TESTTMP/linkcp.py $1 $2
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    27
  > }
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
    28
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    29
Prepare repo r1:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    30
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13272
diff changeset
    31
  $ hg init r1
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    32
  $ cd r1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    33
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    34
  $ echo c1 > f1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    35
  $ hg add f1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    36
  $ hg ci -m0
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    37
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    38
  $ mkdir d1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    39
  $ cd d1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    40
  $ echo c2 > f2
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    41
  $ hg add f2
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    42
  $ hg ci -m1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    43
  $ cd ../..
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    44
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    45
  $ nlinksdir r1/.hg/store
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    46
  1 r1/.hg/store/00changelog.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    47
  1 r1/.hg/store/00manifest.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    48
  1 r1/.hg/store/data/d1/f2.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    49
  1 r1/.hg/store/data/f1.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    50
  1 r1/.hg/store/fncache
15483
9ae766f2f452 phases: set new commit in 1-phase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15455
diff changeset
    51
  1 r1/.hg/store/phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    52
  1 r1/.hg/store/undo
23904
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
    53
  1 r1/.hg/store/undo.backup.fncache
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
    54
  1 r1/.hg/store/undo.backupfiles
15455
c6f87bdab2a1 phases: add rollback support
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15444
diff changeset
    55
  1 r1/.hg/store/undo.phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    56
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    57
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    58
Create hardlinked clone r2:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    59
25125
bd625cd4e5e7 progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24440
diff changeset
    60
  $ hg clone -U --debug r1 r2 --config progress.debug=true
24440
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 24164
diff changeset
    61
  linking: 1
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 24164
diff changeset
    62
  linking: 2
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 24164
diff changeset
    63
  linking: 3
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 24164
diff changeset
    64
  linking: 4
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 24164
diff changeset
    65
  linking: 5
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 24164
diff changeset
    66
  linking: 6
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 24164
diff changeset
    67
  linking: 7
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    68
  linked 7 files
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    69
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    70
Create non-hardlinked clone r3:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    71
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    72
  $ hg clone --pull r1 r3
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    73
  requesting all changes
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    74
  adding changesets
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    75
  adding manifests
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    76
  adding file changes
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    77
  added 2 changesets with 2 changes to 2 files
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    78
  updating to branch default
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    79
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    80
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    81
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    82
Repos r1 and r2 should now contain hardlinked files:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    83
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    84
  $ nlinksdir r1/.hg/store
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    85
  2 r1/.hg/store/00changelog.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    86
  2 r1/.hg/store/00manifest.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    87
  2 r1/.hg/store/data/d1/f2.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    88
  2 r1/.hg/store/data/f1.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    89
  2 r1/.hg/store/fncache
15483
9ae766f2f452 phases: set new commit in 1-phase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15455
diff changeset
    90
  1 r1/.hg/store/phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    91
  1 r1/.hg/store/undo
23904
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
    92
  1 r1/.hg/store/undo.backup.fncache
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
    93
  1 r1/.hg/store/undo.backupfiles
15455
c6f87bdab2a1 phases: add rollback support
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15444
diff changeset
    94
  1 r1/.hg/store/undo.phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    95
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    96
  $ nlinksdir r2/.hg/store
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    97
  2 r2/.hg/store/00changelog.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    98
  2 r2/.hg/store/00manifest.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    99
  2 r2/.hg/store/data/d1/f2.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   100
  2 r2/.hg/store/data/f1.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   101
  2 r2/.hg/store/fncache
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   102
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   103
Repo r3 should not be hardlinked:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   104
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   105
  $ nlinksdir r3/.hg/store
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   106
  1 r3/.hg/store/00changelog.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   107
  1 r3/.hg/store/00manifest.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   108
  1 r3/.hg/store/data/d1/f2.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   109
  1 r3/.hg/store/data/f1.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   110
  1 r3/.hg/store/fncache
15659
7fba5a245acc phases: change publish behavior to only alter behavior when server.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15483
diff changeset
   111
  1 r3/.hg/store/phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   112
  1 r3/.hg/store/undo
23904
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   113
  1 r3/.hg/store/undo.backupfiles
15455
c6f87bdab2a1 phases: add rollback support
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15444
diff changeset
   114
  1 r3/.hg/store/undo.phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   115
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   116
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   117
Create a non-inlined filelog in r3:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   118
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   119
  $ cd r3/d1
16918
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
   120
  >>> f = open('data1', 'wb')
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
   121
  >>> for x in range(10000):
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
   122
  ...     f.write("%s\n" % str(x))
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
   123
  >>> f.close()
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   124
  $ for j in 0 1 2 3 4 5 6 7 8 9; do
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   125
  >   cat data1 >> f2
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   126
  >   hg commit -m$j
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   127
  > done
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   128
  $ cd ../..
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   129
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   130
  $ nlinksdir r3/.hg/store
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   131
  1 r3/.hg/store/00changelog.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   132
  1 r3/.hg/store/00manifest.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   133
  1 r3/.hg/store/data/d1/f2.d
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   134
  1 r3/.hg/store/data/d1/f2.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   135
  1 r3/.hg/store/data/f1.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   136
  1 r3/.hg/store/fncache
15483
9ae766f2f452 phases: set new commit in 1-phase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15455
diff changeset
   137
  1 r3/.hg/store/phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   138
  1 r3/.hg/store/undo
23904
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   139
  1 r3/.hg/store/undo.backup.fncache
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   140
  1 r3/.hg/store/undo.backup.phaseroots
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   141
  1 r3/.hg/store/undo.backupfiles
15455
c6f87bdab2a1 phases: add rollback support
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15444
diff changeset
   142
  1 r3/.hg/store/undo.phaseroots
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   143
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   144
Push to repo r1 should break up most hardlinks in r2:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   145
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   146
  $ hg -R r2 verify
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   147
  checking changesets
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   148
  checking manifests
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   149
  crosschecking files in changesets and manifests
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   150
  checking files
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   151
  2 files, 2 changesets, 2 total revisions
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   152
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   153
  $ cd r3
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   154
  $ hg push
16918
b112e265b78a test-hardlinks: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 16913
diff changeset
   155
  pushing to $TESTTMP/r1 (glob)
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   156
  searching for changes
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   157
  adding changesets
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   158
  adding manifests
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   159
  adding file changes
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   160
  added 10 changesets with 10 changes to 1 files
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   161
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   162
  $ cd ..
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   163
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   164
  $ nlinksdir r2/.hg/store
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   165
  1 r2/.hg/store/00changelog.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   166
  1 r2/.hg/store/00manifest.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   167
  1 r2/.hg/store/data/d1/f2.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   168
  2 r2/.hg/store/data/f1.i
31577
e7a02e9ad162 util: enable hardlink for copyfile
Jun Wu <quark@fb.com>
parents: 30555
diff changeset
   169
  [12] r2/\.hg/store/fncache (re)
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   170
32294
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   171
#if hardlink-whitelisted
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   172
  $ nlinksdir r2/.hg/store/fncache
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   173
  2 r2/.hg/store/fncache
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   174
#endif
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   175
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   176
  $ hg -R r2 verify
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   177
  checking changesets
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   178
  checking manifests
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   179
  crosschecking files in changesets and manifests
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   180
  checking files
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   181
  2 files, 2 changesets, 2 total revisions
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   182
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   183
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   184
  $ cd r1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   185
  $ hg up
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   186
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   187
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   188
Committing a change to f1 in r1 must break up hardlink f1.i in r2:
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   189
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   190
  $ echo c1c1 >> f1
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   191
  $ hg ci -m00
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   192
  $ cd ..
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   193
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   194
  $ nlinksdir r2/.hg/store
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   195
  1 r2/.hg/store/00changelog.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   196
  1 r2/.hg/store/00manifest.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   197
  1 r2/.hg/store/data/d1/f2.i
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   198
  1 r2/.hg/store/data/f1.i
31577
e7a02e9ad162 util: enable hardlink for copyfile
Jun Wu <quark@fb.com>
parents: 30555
diff changeset
   199
  [12] r2/\.hg/store/fncache (re)
12967
70b043405400 tests: add test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   200
32294
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   201
#if hardlink-whitelisted
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   202
  $ nlinksdir r2/.hg/store/fncache
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   203
  2 r2/.hg/store/fncache
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   204
#endif
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   205
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   206
  $ cd r3
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   207
  $ hg tip --template '{rev}:{node|short}\n'
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   208
  11:a6451b6bc41f
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   209
  $ echo bla > f1
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   210
  $ hg ci -m1
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   211
  $ cd ..
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   212
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   213
Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'):
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   214
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   215
  $ linkcp r3 r4
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   216
32295
b9135f191d8a test-hardlink: do not test .hg/cache/checklink
Jun Wu <quark@fb.com>
parents: 32294
diff changeset
   217
'checklink' is produced by hardlinking a symlink, which is undefined whether
b9135f191d8a test-hardlink: do not test .hg/cache/checklink
Jun Wu <quark@fb.com>
parents: 32294
diff changeset
   218
the symlink should be followed or not. It does behave differently on Linux and
b9135f191d8a test-hardlink: do not test .hg/cache/checklink
Jun Wu <quark@fb.com>
parents: 32294
diff changeset
   219
BSD. Just remove it so the test pass on both platforms.
b9135f191d8a test-hardlink: do not test .hg/cache/checklink
Jun Wu <quark@fb.com>
parents: 32294
diff changeset
   220
b9135f191d8a test-hardlink: do not test .hg/cache/checklink
Jun Wu <quark@fb.com>
parents: 32294
diff changeset
   221
  $ rm -f r4/.hg/cache/checklink
b9135f191d8a test-hardlink: do not test .hg/cache/checklink
Jun Wu <quark@fb.com>
parents: 32294
diff changeset
   222
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   223
r4 has hardlinks in the working dir (not just inside .hg):
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   224
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   225
  $ nlinksdir r4
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   226
  2 r4/.hg/00changelog.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   227
  2 r4/.hg/branch
32304
37bcb4665529 tests: fix up recent conditionalized output changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 32295
diff changeset
   228
  2 r4/.hg/cache/branch2-base
37bcb4665529 tests: fix up recent conditionalized output changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 32295
diff changeset
   229
  2 r4/.hg/cache/branch2-served
31830
d34316ae5c58 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31577
diff changeset
   230
  2 r4/.hg/cache/checkisexec (execbit !)
d34316ae5c58 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31577
diff changeset
   231
  ? r4/.hg/cache/checklink-target (glob) (symlink !)
d34316ae5c58 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31577
diff changeset
   232
  2 r4/.hg/cache/checknoexec (execbit !)
23786
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 22648
diff changeset
   233
  2 r4/.hg/cache/rbc-names-v1
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 22648
diff changeset
   234
  2 r4/.hg/cache/rbc-revs-v1
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   235
  2 r4/.hg/dirstate
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   236
  2 r4/.hg/hgrc
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   237
  2 r4/.hg/last-message.txt
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   238
  2 r4/.hg/requires
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   239
  2 r4/.hg/store/00changelog.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   240
  2 r4/.hg/store/00manifest.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   241
  2 r4/.hg/store/data/d1/f2.d
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   242
  2 r4/.hg/store/data/d1/f2.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   243
  2 r4/.hg/store/data/f1.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   244
  2 r4/.hg/store/fncache
15483
9ae766f2f452 phases: set new commit in 1-phase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15455
diff changeset
   245
  2 r4/.hg/store/phaseroots
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   246
  2 r4/.hg/store/undo
23904
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   247
  2 r4/.hg/store/undo.backup.fncache
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   248
  2 r4/.hg/store/undo.backup.phaseroots
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   249
  2 r4/.hg/store/undo.backupfiles
15455
c6f87bdab2a1 phases: add rollback support
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15444
diff changeset
   250
  2 r4/.hg/store/undo.phaseroots
31577
e7a02e9ad162 util: enable hardlink for copyfile
Jun Wu <quark@fb.com>
parents: 30555
diff changeset
   251
  [24] r4/\.hg/undo\.backup\.dirstate (re)
14266
89e7d35e0ef0 fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents: 13272
diff changeset
   252
  2 r4/.hg/undo.bookmarks
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   253
  2 r4/.hg/undo.branch
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   254
  2 r4/.hg/undo.desc
31577
e7a02e9ad162 util: enable hardlink for copyfile
Jun Wu <quark@fb.com>
parents: 30555
diff changeset
   255
  [24] r4/\.hg/undo\.dirstate (re)
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   256
  2 r4/d1/data1
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   257
  2 r4/d1/f2
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   258
  2 r4/f1
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   259
32294
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   260
#if hardlink-whitelisted
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   261
  $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   262
  4 r4/.hg/undo.backup.dirstate
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   263
  4 r4/.hg/undo.dirstate
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   264
#endif
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   265
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   266
Update back to revision 11 in r4 should break hardlink of file f1:
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   267
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   268
  $ hg -R r4 up 11
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   269
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   270
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   271
  $ nlinksdir r4
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   272
  2 r4/.hg/00changelog.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   273
  1 r4/.hg/branch
32304
37bcb4665529 tests: fix up recent conditionalized output changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 32295
diff changeset
   274
  2 r4/.hg/cache/branch2-base
37bcb4665529 tests: fix up recent conditionalized output changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 32295
diff changeset
   275
  2 r4/.hg/cache/branch2-served
31830
d34316ae5c58 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31577
diff changeset
   276
  2 r4/.hg/cache/checkisexec (execbit !)
d34316ae5c58 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31577
diff changeset
   277
  2 r4/.hg/cache/checklink-target (symlink !)
d34316ae5c58 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31577
diff changeset
   278
  2 r4/.hg/cache/checknoexec (execbit !)
23786
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 22648
diff changeset
   279
  2 r4/.hg/cache/rbc-names-v1
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 22648
diff changeset
   280
  2 r4/.hg/cache/rbc-revs-v1
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   281
  1 r4/.hg/dirstate
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   282
  2 r4/.hg/hgrc
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   283
  2 r4/.hg/last-message.txt
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   284
  2 r4/.hg/requires
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   285
  2 r4/.hg/store/00changelog.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   286
  2 r4/.hg/store/00manifest.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   287
  2 r4/.hg/store/data/d1/f2.d
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   288
  2 r4/.hg/store/data/d1/f2.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   289
  2 r4/.hg/store/data/f1.i
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   290
  2 r4/.hg/store/fncache
15483
9ae766f2f452 phases: set new commit in 1-phase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15455
diff changeset
   291
  2 r4/.hg/store/phaseroots
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   292
  2 r4/.hg/store/undo
23904
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   293
  2 r4/.hg/store/undo.backup.fncache
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   294
  2 r4/.hg/store/undo.backup.phaseroots
d251da5e0e84 transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23786
diff changeset
   295
  2 r4/.hg/store/undo.backupfiles
15455
c6f87bdab2a1 phases: add rollback support
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15444
diff changeset
   296
  2 r4/.hg/store/undo.phaseroots
31577
e7a02e9ad162 util: enable hardlink for copyfile
Jun Wu <quark@fb.com>
parents: 30555
diff changeset
   297
  [24] r4/\.hg/undo\.backup\.dirstate (re)
14266
89e7d35e0ef0 fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents: 13272
diff changeset
   298
  2 r4/.hg/undo.bookmarks
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   299
  2 r4/.hg/undo.branch
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   300
  2 r4/.hg/undo.desc
31577
e7a02e9ad162 util: enable hardlink for copyfile
Jun Wu <quark@fb.com>
parents: 30555
diff changeset
   301
  [24] r4/\.hg/undo\.dirstate (re)
13019
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   302
  2 r4/d1/data1
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   303
  2 r4/d1/f2
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   304
  1 r4/f1
42ac864ed394 test-hardlinks: add testcase for repo copied with 'cp -al'
Adrian Buehlmann <adrian@cadifra.com>
parents: 12967
diff changeset
   305
32294
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   306
#if hardlink-whitelisted
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   307
  $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   308
  4 r4/.hg/undo.backup.dirstate
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   309
  4 r4/.hg/undo.dirstate
905a2eff08a6 test-hardlinks: unify two test files into one
Jun Wu <quark@fb.com>
parents: 32268
diff changeset
   310
#endif
13034
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   311
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   312
Test hardlinking outside hg:
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   313
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   314
  $ mkdir x
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   315
  $ echo foo > x/a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   316
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   317
  $ linkcp x y
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   318
  $ echo bar >> y/a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   319
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   320
No diff if hardlink:
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   321
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   322
  $ diff x/a y/a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   323
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   324
Test mq hardlinking:
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   325
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   326
  $ echo "[extensions]" >> $HGRCPATH
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   327
  $ echo "mq=" >> $HGRCPATH
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   328
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   329
  $ hg init a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   330
  $ cd a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   331
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   332
  $ hg qimport -n foo - << EOF
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   333
  > # HG changeset patch
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   334
  > # Date 1 0
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   335
  > diff -r 2588a8b53d66 a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   336
  > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   337
  > +++ b/a	Wed Jul 23 15:54:29 2008 +0200
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   338
  > @@ -0,0 +1,1 @@
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   339
  > +a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   340
  > EOF
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   341
  adding foo to series file
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   342
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   343
  $ hg qpush
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   344
  applying foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   345
  now at: foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   346
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   347
  $ cd ..
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   348
  $ linkcp a b
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   349
  $ cd b
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   350
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   351
  $ hg qimport -n bar - << EOF
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   352
  > # HG changeset patch
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   353
  > # Date 2 0
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   354
  > diff -r 2588a8b53d66 a
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   355
  > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   356
  > +++ b/b	Wed Jul 23 15:54:29 2008 +0200
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   357
  > @@ -0,0 +1,1 @@
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   358
  > +b
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   359
  > EOF
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   360
  adding bar to series file
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   361
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   362
  $ hg qpush
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   363
  applying bar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   364
  now at: bar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   365
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   366
  $ cat .hg/patches/status
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   367
  430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   368
  4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   369
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   370
  $ cat .hg/patches/series
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   371
  foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   372
  bar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   373
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   374
  $ cat ../a/.hg/patches/status
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   375
  430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   376
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   377
  $ cat ../a/.hg/patches/series
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   378
  foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   379
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   380
Test tags hardlinking:
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   381
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   382
  $ hg qdel -r qbase:qtip
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   383
  patch foo finalized without changeset message
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   384
  patch bar finalized without changeset message
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   385
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   386
  $ hg tag -l lfoo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   387
  $ hg tag foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   388
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   389
  $ cd ..
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   390
  $ linkcp b c
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   391
  $ cd c
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   392
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   393
  $ hg tag -l -r 0 lbar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   394
  $ hg tag -r 0 bar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   395
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   396
  $ cat .hgtags
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   397
  4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   398
  430ed4828a74fa4047bc816a25500f7472ab4bfe bar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   399
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   400
  $ cat .hg/localtags
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   401
  4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   402
  430ed4828a74fa4047bc816a25500f7472ab4bfe lbar
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   403
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   404
  $ cat ../b/.hgtags
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   405
  4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   406
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   407
  $ cat ../b/.hg/localtags
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   408
  4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
8cb33163b391 tests: integrate test-hardlinks-safety.t into test-hardlinks.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 13019
diff changeset
   409
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15659
diff changeset
   410
  $ cd ..