comparison 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
comparison
equal deleted inserted replaced
22284:72b378658cff 22285:85bded43cc80
101 101
102 Test that "hg rollback" restores status of largefiles correctly 102 Test that "hg rollback" restores status of largefiles correctly
103 103
104 $ hg update -C -q 104 $ hg update -C -q
105 $ hg remove large1 105 $ hg remove large1
106 $ test -f .hglf/large1
107 [1]
106 $ hg forget large2 108 $ hg forget large2
109 $ test -f .hglf/large2
110 [1]
107 $ echo largeX > largeX 111 $ echo largeX > largeX
108 $ hg add --large largeX 112 $ hg add --large largeX
113 $ cat .hglf/largeX
114
109 $ hg commit -m 'will be rollback-ed soon' 115 $ hg commit -m 'will be rollback-ed soon'
110 $ echo largeY > largeY 116 $ echo largeY > largeY
111 $ hg add --large largeY 117 $ hg add --large largeY
112 $ hg status -A large1 118 $ hg status -A large1
113 large1: No such file or directory 119 large1: No such file or directory
120 $ hg rollback 126 $ hg rollback
121 repository tip rolled back to revision 3 (undo commit) 127 repository tip rolled back to revision 3 (undo commit)
122 working directory now based on revision 3 128 working directory now based on revision 3
123 $ hg status -A large1 129 $ hg status -A large1
124 R large1 130 R large1
131 $ test -f .hglf/large1
132 [1]
125 $ hg status -A large2 133 $ hg status -A large2
126 R large2 134 R large2
135 $ test -f .hglf/large2
136 [1]
127 $ hg status -A largeX 137 $ hg status -A largeX
128 A largeX 138 A largeX
139 $ cat .hglf/largeX
140
129 $ hg status -A largeY 141 $ hg status -A largeY
130 ? largeY 142 ? largeY
131 143
132 Test that "hg rollback" restores standins correctly 144 Test that "hg rollback" restores standins correctly
133 145