annotate tests/test-lfs-largefiles.t @ 35125:ec7f0bb95277

test-lfs: add tests demonstrating the interaction with largefiles Obviously the original series needs to be accepted first, but there are concerns about how well these extensions will play together before proceeding. It looks like the answer is surprisingly well. There are some merge surprises (largefiles seems to combine the choice of "keep tracking as a large/normal file" with taking the content of the large/normal file) and some existing diff weirdness (largefiles diffs the standins, not the large file). Converting the repo to normal files seemlessly transitions to lfs on the fly. I didn't test going the other way, because I'm not sure why anyone would want to do that. I flagged the lack of a repo requirement after converting, because some of the unsubmitted changes I have add a requirement on commit, but this somehow misses the convert case. I flagged an issue where devel-warnings are emitted on convert, which is a separate issue.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 18 Nov 2017 12:54:06 -0500
parents
children f6f8b7c8919a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35125
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
1 This tests the interaction between the largefiles and lfs extensions, and
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
2 conversion from largefiles -> lfs.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
3
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
4 $ cat >> $HGRCPATH << EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
5 > [extensions]
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
6 > largefiles =
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
7 >
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
8 > [lfs]
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
9 > # standin files are 41 bytes. Stay bigger for clarity.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
10 > threshold = 42
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
11 > EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
12
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
13 Setup a repo with a normal file and a largefile, above and below the lfs
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
14 threshold to test lfconvert. *.txt start life as a normal file; *.bin start as
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
15 an lfs/largefile.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
16
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
17 $ hg init largefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
18 $ cd largefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
19 $ echo 'normal' > normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
20 $ echo 'normal above lfs threshold 0000000000000000000000000' > lfs.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
21 $ hg ci -Am 'normal.txt'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
22 adding lfs.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
23 adding normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
24 $ echo 'largefile' > large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
25 $ echo 'largefile above lfs threshold 0000000000000000000000' > lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
26 $ hg add --large large.bin lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
27 $ hg ci -m 'add largefiles'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
28
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
29 $ cat >> $HGRCPATH << EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
30 > [extensions]
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
31 > lfs =
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
32 > EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
33
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
34 Add an lfs file and normal file that collide with files on the other branch.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
35 large.bin is added as a normal file, and is named as such only to clash with the
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
36 largefile on the other branch.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
37
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
38 $ hg up -q '.^'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
39 $ echo 'below lfs threshold' > large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
40 $ echo 'lfs above the lfs threshold for length 0000000000000' > lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
41 $ hg ci -Am 'add with lfs extension'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
42 adding large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
43 adding lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
44 created new head
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
45
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
46 $ hg log -G
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
47 @ changeset: 2:e989d0fa3764
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
48 | tag: tip
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
49 | parent: 0:29361292f54d
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
50 | user: test
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
51 | date: Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
52 | summary: add with lfs extension
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
53 |
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
54 | o changeset: 1:6513aaab9ca0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
55 |/ user: test
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
56 | date: Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
57 | summary: add largefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
58 |
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
59 o changeset: 0:29361292f54d
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
60 user: test
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
61 date: Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
62 summary: normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
63
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
64 --------------------------------------------------------------------------------
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
65 Merge largefiles into lfs branch
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
66
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
67 The largefiles extension will prompt to use the normal or largefile when merged
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
68 into the lfs files. `hg manifest` will show standins if present. They aren't,
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
69 because largefiles merge doesn't merge content. If it did, selecting (n)ormal
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
70 would convert to lfs on commit, if appropriate.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
71
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
72 BUG: Largefiles isn't running the merge tool, like when two lfs files are
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
73 merged. This is probably by design, but it should probably at least prompt if
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
74 content should be taken from (l)ocal or (o)ther as well.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
75
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
76 $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
77 > n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
78 > n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
79 > EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
80 remote turned local normal file large.bin into a largefile
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
81 use (l)argefile or keep (n)ormal file? n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
82 remote turned local normal file lfs.bin into a largefile
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
83 use (l)argefile or keep (n)ormal file? n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
84 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
85 (branch merge, don't forget to commit)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
86 $ hg ci -m 'merge lfs with largefiles -> normal'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
87 $ hg manifest
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
88 large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
89 lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
90 lfs.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
91 normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
92
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
93 The merged lfs.bin resolved to lfs because the (n)ormal option was picked. The
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
94 lfs.txt file is unchanged by the merge, because it was added before lfs was
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
95 enabled, and the content didn't change.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
96 $ hg debugdata lfs.bin 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
97 version https://git-lfs.github.com/spec/v1
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
98 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
99 size 53
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
100 x-is-binary 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
101 $ hg debugdata lfs.txt 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
102 normal above lfs threshold 0000000000000000000000000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
103
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
104 Another filelog entry is NOT made by the merge, so nothing is committed as lfs.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
105 $ hg log -r . -T '{join(lfs_files, ", ")}\n'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
106
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
107
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
108 Replay the last merge, but pick (l)arge this time. The manifest will show any
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
109 standins.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
110
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
111 $ hg up -Cq e989d0fa3764
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
112
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
113 $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
114 > l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
115 > l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
116 > EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
117 remote turned local normal file large.bin into a largefile
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
118 use (l)argefile or keep (n)ormal file? l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
119 remote turned local normal file lfs.bin into a largefile
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
120 use (l)argefile or keep (n)ormal file? l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
121 getting changed largefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
122 2 largefiles updated, 0 removed
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
123 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
124 (branch merge, don't forget to commit)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
125 $ hg ci -m 'merge lfs with largefiles -> large'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
126 created new head
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
127 $ hg manifest
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
128 .hglf/large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
129 .hglf/lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
130 lfs.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
131 normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
132
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
133 --------------------------------------------------------------------------------
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
134 Merge lfs into largefiles branch
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
135
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
136 $ hg up -Cq 6513aaab9ca0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
137 $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
138 > n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
139 > n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
140 > EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
141 remote turned local largefile large.bin into a normal file
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
142 keep (l)argefile or use (n)ormal file? n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
143 remote turned local largefile lfs.bin into a normal file
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
144 keep (l)argefile or use (n)ormal file? n
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
145 getting changed largefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
146 0 largefiles updated, 0 removed
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
147 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
148 (branch merge, don't forget to commit)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
149 $ hg ci -m 'merge largefiles with lfs -> normal'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
150 created new head
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
151 $ hg manifest
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
152 large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
153 lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
154 lfs.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
155 normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
156
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
157 The merged lfs.bin got converted to lfs because the (n)ormal option was picked.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
158 The lfs.txt file is unchanged by the merge, because it was added before lfs was
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
159 enabled.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
160 $ hg debugdata lfs.bin 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
161 version https://git-lfs.github.com/spec/v1
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
162 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
163 size 53
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
164 x-is-binary 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
165 $ hg debugdata lfs.txt 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
166 normal above lfs threshold 0000000000000000000000000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
167
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
168 Another filelog entry is NOT made by the merge, so nothing is committed as lfs.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
169 $ hg log -r . -T '{join(lfs_files, ", ")}\n'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
170
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
171
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
172 Replay the last merge, but pick (l)arge this time. The manifest will show the
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
173 standins.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
174
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
175 $ hg up -Cq 6513aaab9ca0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
176
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
177 $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
178 > l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
179 > l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
180 > EOF
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
181 remote turned local largefile large.bin into a normal file
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
182 keep (l)argefile or use (n)ormal file? l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
183 remote turned local largefile lfs.bin into a normal file
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
184 keep (l)argefile or use (n)ormal file? l
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
185 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
186 (branch merge, don't forget to commit)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
187 $ hg ci -m 'merge largefiles with lfs -> large'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
188 created new head
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
189 $ hg manifest
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
190 .hglf/large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
191 .hglf/lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
192 lfs.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
193 normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
194
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
195 --------------------------------------------------------------------------------
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
196
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
197 When both largefiles and lfs are configured to add by size, the tie goes to
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
198 largefiles since it hooks cmdutil.add() and lfs hooks the filelog write in the
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
199 commit. By the time the commit occurs, the tracked file is smaller than the
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
200 threshold (assuming it is > 41, so the standins don't become lfs objects).
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
201
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
202 $ yes | head -n 1048576 > large_by_size.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
203 $ hg --config largefiles.minsize=1 ci -Am 'large by size'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
204 adding large_by_size.bin as a largefile
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
205 $ hg manifest
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
206 .hglf/large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
207 .hglf/large_by_size.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
208 .hglf/lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
209 lfs.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
210 normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
211
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
212 $ hg rm large_by_size.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
213 $ hg ci -m 'remove large_by_size.bin'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
214
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
215 Largefiles doesn't do anything special with diff, so it falls back to diffing
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
216 the standins. Extdiff also is standin based comparison. Diff and extdiff both
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
217 work on the original file for lfs objects.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
218
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
219 Largefile -> lfs transition
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
220 $ hg diff -r 1 -r 3
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
221 diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
222 --- a/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
223 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
224 @@ -1,1 +0,0 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
225 -cef9a458373df9b0743a0d3c14d0c66fb19b8629
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
226 diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
227 --- a/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
228 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
229 @@ -1,1 +0,0 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
230 -557fb6309cef935e1ac2c8296508379e4b15a6e6
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
231 diff -r 6513aaab9ca0 -r dcc5ce63e252 large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
232 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
233 +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
234 @@ -0,0 +1,1 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
235 +below lfs threshold
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
236 diff -r 6513aaab9ca0 -r dcc5ce63e252 lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
237 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
238 +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
239 @@ -0,0 +1,1 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
240 +lfs above the lfs threshold for length 0000000000000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
241
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
242 lfs -> largefiles transition
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
243 $ hg diff -r 2 -r 6
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
244 diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
245 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
246 +++ b/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
247 @@ -0,0 +1,1 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
248 +cef9a458373df9b0743a0d3c14d0c66fb19b8629
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
249 diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
250 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
251 +++ b/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
252 @@ -0,0 +1,1 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
253 +557fb6309cef935e1ac2c8296508379e4b15a6e6
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
254 diff -r e989d0fa3764 -r 95e1e80325c8 large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
255 --- a/large.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
256 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
257 @@ -1,1 +0,0 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
258 -below lfs threshold
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
259 diff -r e989d0fa3764 -r 95e1e80325c8 lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
260 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
261 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
262 @@ -1,1 +0,0 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
263 -lfs above the lfs threshold for length 0000000000000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
264
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
265 A largefiles repo can be converted to lfs. The lfconvert command uses the
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
266 convert extension under the hood with --to-normal. So the --config based
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
267 parameters are available, but not --authormap, --branchmap, etc.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
268
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
269 XXX: The default configitems are registered in convert.__init__, and I have no
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
270 idea how to load that before lfconvert starts using other convert modules and
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
271 incurring a devel-warn. Even if the convert extension is enabled on the command
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
272 line, it complains. I have no idea how this fails, and the test in fcd2f9b06629
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
273 works.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
274
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
275 $ cd ..
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
276 $ hg lfconvert --to-normal largefiles nolargefiles 2>&1 | grep -v 'devel-warn'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
277 initializing destination nolargefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
278 0 additional largefiles cached
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
279 scanning source...
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
280 sorting...
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
281 converting...
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
282 8 normal.txt
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
283 7 add largefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
284 6 add with lfs extension
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
285 5 merge lfs with largefiles -> normal
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
286 4 merge lfs with largefiles -> large
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
287 3 merge largefiles with lfs -> normal
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
288 2 merge largefiles with lfs -> large
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
289 1 large by size
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
290 0 remove large_by_size.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
291 $ cd nolargefiles
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
292
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
293 BUG: This should have a requires line for 'lfs'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
294
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
295 $ cat .hg/requires
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
296 dotencode
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
297 fncache
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
298 generaldelta
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
299 revlogv1
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
300 store
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
301 $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n'
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
302 o 8 (remove large_by_size.bin)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
303 |
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
304 o 7 large_by_size.bin (large by size)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
305 |
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
306 o 6 (merge largefiles with lfs -> large)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
307 |\
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
308 +---o 5 (merge largefiles with lfs -> normal)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
309 | |/
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
310 +---o 4 lfs.bin (merge lfs with largefiles -> large)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
311 | |/
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
312 +---o 3 (merge lfs with largefiles -> normal)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
313 | |/
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
314 | o 2 lfs.bin (add with lfs extension)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
315 | |
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
316 o | 1 lfs.bin (add largefiles)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
317 |/
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
318 o 0 lfs.txt (normal.txt)
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
319
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
320 $ hg debugdata lfs.bin 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
321 version https://git-lfs.github.com/spec/v1
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
322 oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
323 size 53
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
324 x-is-binary 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
325 $ hg debugdata lfs.bin 1
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
326 version https://git-lfs.github.com/spec/v1
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
327 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
328 size 53
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
329 x-is-binary 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
330 $ hg debugdata lfs.bin 2
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
331 version https://git-lfs.github.com/spec/v1
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
332 oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
333 size 53
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
334 x-is-binary 0
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
335 $ hg debugdata lfs.bin 3
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
336 abort: invalid revision identifier 3
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
337 [255]
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
338
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
339 No diffs when comparing merge and p1 that kept p1's changes. Diff of lfs to
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
340 largefiles no longer operates in standin files.
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
341
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
342 $ hg diff -r 2:3
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
343 $ hg diff -r 2:6
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
344 diff -r e989d0fa3764 -r 752e3a0d8488 large.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
345 --- a/large.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
346 +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
347 @@ -1,1 +1,1 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
348 -below lfs threshold
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
349 +largefile
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
350 diff -r e989d0fa3764 -r 752e3a0d8488 lfs.bin
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
351 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
352 +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
353 @@ -1,1 +1,1 @@
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
354 -lfs above the lfs threshold for length 0000000000000
ec7f0bb95277 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
355 +largefile above lfs threshold 0000000000000000000000