annotate tests/test-largefiles-update.t @ 22285:85bded43cc80

largefiles: restore standins according to restored dirstate Before this patch, standins are restored from the NEW parent of the working directory at "hg rollback", and this causes: - standins removed in the rollback-ed revision are restored, and become orphan, because they are already marked as "R" in the restored dirstate and expected to be unlinked - standins added in the rollback-ed revision are left as they were before rollback, because they are not included in the new parent (this may not be so serious) This patch replaces the "merge.update" invocation with a specific implementation to restore standins according to restored dirstate. This is also the preparation to centralize the logic of updating largefiles into the function wrapping "merge.update" in the subsequent patch. After that patch, "merge.update" will also update largefiles in the working directory and be redundant for restoring standins only.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 24 Aug 2014 23:47:25 +0900
parents 72b378658cff
children 3f3b9483e7ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21932
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
1 This file focuses mainly on updating largefiles in the working
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
2 directory (and ".hg/largefiles/dirstate")
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
3
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
4 $ cat >> $HGRCPATH <<EOF
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
5 > [ui]
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
6 > merge = internal:fail
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
7 > [extensions]
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
8 > largefiles =
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
9 > EOF
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
10
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
11 $ hg init repo
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
12 $ cd repo
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
13
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
14 $ echo large1 > large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
15 $ echo large2 > large2
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
16 $ hg add --large large1 large2
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
17 $ echo normal1 > normal1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
18 $ hg add normal1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
19 $ hg commit -m '#0'
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
20 $ echo 'large1 in #1' > large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
21 $ echo 'normal1 in #1' > normal1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
22 $ hg commit -m '#1'
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
23 $ hg update -q -C 0
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
24 $ echo 'large2 in #2' > large2
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
25 $ hg commit -m '#2'
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
26 created new head
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
27
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
28 Test that "hg merge" updates largefiles from "other" correctly
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
29
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
30 (getting largefiles from "other" normally)
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
31
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
32 $ hg status -A large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
33 C large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
34 $ cat large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
35 large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
36 $ cat .hglf/large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
37 4669e532d5b2c093a78eca010077e708a071bb64
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
38 $ hg merge --config debug.dirstate.delaywrite=2
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
39 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
40 (branch merge, don't forget to commit)
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
41 getting changed largefiles
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
42 1 largefiles updated, 0 removed
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
43 $ hg status -A large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
44 M large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
45 $ cat large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
46 large1 in #1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
47 $ cat .hglf/large1
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
48 58e24f733a964da346e2407a2bee99d9001184f5
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
49 $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
50 -4669e532d5b2c093a78eca010077e708a071bb64
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
51 +58e24f733a964da346e2407a2bee99d9001184f5
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
52
21933
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
53 (getting largefiles from "other" via conflict prompt)
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
54
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
55 $ hg update -q -C 2
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
56 $ echo 'large1 in #3' > large1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
57 $ echo 'normal1 in #3' > normal1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
58 $ hg commit -m '#3'
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
59 $ cat .hglf/large1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
60 e5bb990443d6a92aaf7223813720f7566c9dd05b
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
61 $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
62 > o
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
63 > EOF
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
64 largefile large1 has a merge conflict
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
65 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
66 keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
67 take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? merging normal1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
68 warning: conflicts during merge.
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
69 merging normal1 incomplete! (edit conflicts, then use 'hg resolve --mark')
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
70 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
71 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
72 getting changed largefiles
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
73 1 largefiles updated, 0 removed
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
74 [1]
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
75 $ hg status -A large1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
76 M large1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
77 $ cat large1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
78 large1 in #1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
79 $ cat .hglf/large1
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
80 58e24f733a964da346e2407a2bee99d9001184f5
8ecbe55fd09d largefiles: invoke "normallookup" on "lfdirstate" for merged files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21932
diff changeset
81
21934
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
82 Test that "hg revert -r REV" updates largefiles from "REV" correctly
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
83
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
84 $ hg update -q -C 3
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
85 $ hg status -A large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
86 C large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
87 $ cat large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
88 large1 in #3
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
89 $ cat .hglf/large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
90 e5bb990443d6a92aaf7223813720f7566c9dd05b
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
91 $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
92 -4669e532d5b2c093a78eca010077e708a071bb64
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
93 +58e24f733a964da346e2407a2bee99d9001184f5
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
94 $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
95 $ hg status -A large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
96 M large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
97 $ cat large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
98 large1 in #1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
99 $ cat .hglf/large1
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
100 58e24f733a964da346e2407a2bee99d9001184f5
0cb34b3991f8 largefiles: use "normallookup" on "lfdirstate" while reverting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21933
diff changeset
101
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
102 Test that "hg rollback" restores status of largefiles correctly
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
103
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
104 $ hg update -C -q
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
105 $ hg remove large1
22285
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
106 $ test -f .hglf/large1
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
107 [1]
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
108 $ hg forget large2
22285
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
109 $ test -f .hglf/large2
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
110 [1]
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
111 $ echo largeX > largeX
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
112 $ hg add --large largeX
22285
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
113 $ cat .hglf/largeX
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
114
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
115 $ hg commit -m 'will be rollback-ed soon'
22097
7d1eac06ab2b largefiles: drop orphan entries from lfdristat at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22096
diff changeset
116 $ echo largeY > largeY
7d1eac06ab2b largefiles: drop orphan entries from lfdristat at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22096
diff changeset
117 $ hg add --large largeY
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
118 $ hg status -A large1
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
119 large1: No such file or directory
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
120 $ hg status -A large2
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
121 ? large2
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
122 $ hg status -A largeX
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
123 C largeX
22097
7d1eac06ab2b largefiles: drop orphan entries from lfdristat at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22096
diff changeset
124 $ hg status -A largeY
7d1eac06ab2b largefiles: drop orphan entries from lfdristat at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22096
diff changeset
125 A largeY
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
126 $ hg rollback
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
127 repository tip rolled back to revision 3 (undo commit)
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
128 working directory now based on revision 3
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
129 $ hg status -A large1
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
130 R large1
22285
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
131 $ test -f .hglf/large1
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
132 [1]
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
133 $ hg status -A large2
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
134 R large2
22285
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
135 $ test -f .hglf/large2
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
136 [1]
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
137 $ hg status -A largeX
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
138 A largeX
22285
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
139 $ cat .hglf/largeX
85bded43cc80 largefiles: restore standins according to restored dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22284
diff changeset
140
22097
7d1eac06ab2b largefiles: drop orphan entries from lfdristat at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22096
diff changeset
141 $ hg status -A largeY
7d1eac06ab2b largefiles: drop orphan entries from lfdristat at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22096
diff changeset
142 ? largeY
22096
61e526585b20 largefiles: restore R status of removed largefiles correctly at "hg rollback"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21934
diff changeset
143
22283
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
144 Test that "hg rollback" restores standins correctly
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
145
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
146 $ hg commit -m 'will be rollback-ed soon'
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
147 $ hg update -q -C 2
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
148 $ cat large1
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
149 large1
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
150 $ cat .hglf/large1
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
151 4669e532d5b2c093a78eca010077e708a071bb64
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
152 $ cat large2
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
153 large2 in #2
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
154 $ cat .hglf/large2
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
155 3cfce6277e7668985707b6887ce56f9f62f6ccd9
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
156
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
157 $ hg rollback -q -f
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
158 $ cat large1
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
159 large1
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
160 $ cat .hglf/large1
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
161 4669e532d5b2c093a78eca010077e708a071bb64
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
162 $ cat large2
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
163 large2 in #2
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
164 $ cat .hglf/large2
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
165 3cfce6277e7668985707b6887ce56f9f62f6ccd9
cb556ea76dcd largefiles: omit restoring standins if working parent is not rollbacked
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22197
diff changeset
166
22284
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
167 (rollback the parent of the working directory, when the parent of it
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
168 is not branch-tip)
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
169
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
170 $ hg update -q -C 1
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
171 $ cat .hglf/large1
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
172 58e24f733a964da346e2407a2bee99d9001184f5
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
173 $ cat .hglf/large2
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
174 1deebade43c8c498a3c8daddac0244dc55d1331d
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
175
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
176 $ echo normalX > normalX
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
177 $ hg add normalX
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
178 $ hg commit -m 'will be rollback-ed soon'
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
179 $ hg rollback -q
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
180
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
181 $ cat .hglf/large1
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
182 58e24f733a964da346e2407a2bee99d9001184f5
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
183 $ cat .hglf/large2
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
184 1deebade43c8c498a3c8daddac0244dc55d1331d
72b378658cff largefiles: restore standins from non branch-tip parent at rollback correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22283
diff changeset
185
22098
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
186 Test that "hg status" shows status of largefiles correctly just after
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
187 automated commit like rebase/transplant
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
188
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
189 $ cat >> .hg/hgrc <<EOF
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
190 > [extensions]
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
191 > rebase =
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
192 > strip =
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
193 > transplant =
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
194 > EOF
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
195 $ hg update -q -C 1
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
196 $ hg remove large1
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
197 $ echo largeX > largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
198 $ hg add --large largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
199 $ hg commit -m '#4'
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
200
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
201 $ hg rebase -s 1 -d 2 --keep
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
202 $ hg status -A large1
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
203 large1: No such file or directory
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
204 $ hg status -A largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
205 C largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
206 $ hg strip -q 5
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
207
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
208 $ hg update -q -C 2
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
209 $ hg transplant -q 1 4
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
210 $ hg status -A large1
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
211 large1: No such file or directory
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
212 $ hg status -A largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
213 C largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
214 $ hg strip -q 5
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
215
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
216 $ hg update -q -C 2
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
217 $ hg transplant -q --merge 1 --merge 4
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
218 $ hg status -A large1
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
219 large1: No such file or directory
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
220 $ hg status -A largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
221 C largeX
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
222 $ hg strip -q 5
2fb3c1c0b4ef largefiles: synchronize lfdirstate with dirstate after automated committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22097
diff changeset
223
22195
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
224 Test that linear merge can detect modification (and conflict) correctly
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
225
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
226 (linear merge without conflict)
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
227
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
228 $ echo 'large2 for linear merge (no conflict)' > large2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
229 $ hg update 3 --config debug.dirstate.delaywrite=2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
230 getting changed largefiles
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
231 1 largefiles updated, 0 removed
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
232 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
233 $ hg status -A large2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
234 M large2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
235 $ cat large2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
236 large2 for linear merge (no conflict)
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
237 $ cat .hglf/large2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
238 9c4bf8f1b33536d6e5f89447e10620cfe52ea710
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
239
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
240 (linear merge with conflict, choosing "other")
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
241
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
242 $ hg update -q -C 2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
243 $ echo 'large1 for linear merge (conflict)' > large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
244 $ hg update 3 --config ui.interactive=True <<EOF
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
245 > o
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
246 > EOF
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
247 largefile large1 has a merge conflict
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
248 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
249 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
250 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? getting changed largefiles
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
251 1 largefiles updated, 0 removed
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
252 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
253 $ hg status -A large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
254 C large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
255 $ cat large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
256 large1 in #3
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
257 $ cat .hglf/large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
258 e5bb990443d6a92aaf7223813720f7566c9dd05b
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
259
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
260 (linear merge with conflict, choosing "local")
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
261
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
262 $ hg update -q -C 2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
263 $ echo 'large1 for linear merge (conflict)' > large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
264 $ hg update 3 --config debug.dirstate.delaywrite=2
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
265 largefile large1 has a merge conflict
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
266 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
267 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
268 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
269 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
270 $ hg status -A large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
271 M large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
272 $ cat large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
273 large1 for linear merge (conflict)
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
274 $ cat .hglf/large1
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
275 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
1dad76c0afb7 largefiles: add test for large/normal conflict at linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22098
diff changeset
276
22196
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
277 Test a linear merge to a revision containing same-name normal file
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
278
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
279 $ hg update -q -C 3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
280 $ hg remove large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
281 $ echo 'large2 as normal file' > large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
282 $ hg add large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
283 $ echo 'large3 as normal file' > large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
284 $ hg add large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
285 $ hg commit -m '#5'
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
286 $ hg manifest
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
287 .hglf/large1
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
288 large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
289 large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
290 normal1
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
291
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
292 (modified largefile is already switched to normal)
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
293
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
294 $ hg update -q -C 2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
295 $ echo 'modified large2 for linear merge' > large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
296 $ hg update -q 5
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
297 local changed .hglf/large2 which remote deleted
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
298 use (c)hanged version or (d)elete? c
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
299 remote turned local largefile large2 into a normal file
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
300 keep (l)argefile or use (n)ormal file? l
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
301 $ hg debugdirstate --nodates | grep large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
302 a 0 -1 .hglf/large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
303 r 0 0 large2
22197
f72d73937853 largefiles: update lfdirstate for unchanged largefiles during linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22196
diff changeset
304 $ hg status -A large2
f72d73937853 largefiles: update lfdirstate for unchanged largefiles during linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22196
diff changeset
305 A large2
22196
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
306 $ cat large2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
307 modified large2 for linear merge
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
308
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
309 (added largefile is already committed as normal)
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
310
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
311 $ hg update -q -C 2
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
312 $ echo 'large3 as large file for linear merge' > large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
313 $ hg add --large large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
314 $ hg update -q 5
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
315 remote turned local largefile large3 into a normal file
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
316 keep (l)argefile or use (n)ormal file? l
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
317 $ hg debugdirstate --nodates | grep large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
318 a 0 -1 .hglf/large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
319 r 0 0 large3
22197
f72d73937853 largefiles: update lfdirstate for unchanged largefiles during linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22196
diff changeset
320 $ hg status -A large3
f72d73937853 largefiles: update lfdirstate for unchanged largefiles during linear merging
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22196
diff changeset
321 A large3
22196
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
322 $ cat large3
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
323 large3 as large file for linear merge
23fe278bde43 largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22195
diff changeset
324
21932
21a2f31f054d largefiles: use "normallookup", if "mtime" of standin is unset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff changeset
325 $ cd ..