##// END OF EJS Templates
largefiles: fix "hg status dir" missing regular files (issue3421)...
Patrick Mezard -
r16586:ebd2ead5 stable
parent child Browse files
Show More
@@ -136,13 +136,22 b' def reposetup(ui, repo):'
136
136
137 # Create a copy of match that matches standins instead
137 # Create a copy of match that matches standins instead
138 # of largefiles.
138 # of largefiles.
139 def tostandin(file):
139 def tostandins(files):
140 if working:
140 if not working:
141 sf = lfutil.standin(file)
141 return files
142 dirstate = repo.dirstate
142 newfiles = []
143 if sf in dirstate or sf in dirstate.dirs():
143 dirstate = repo.dirstate
144 return sf
144 for f in files:
145 return file
145 sf = lfutil.standin(f)
146 if sf in dirstate:
147 newfiles.append(sf)
148 elif sf in dirstate.dirs():
149 # Directory entries could be regular or
150 # standin, check both
151 newfiles.extend((f, sf))
152 else:
153 newfiles.append(f)
154 return newfiles
146
155
147 # Create a function that we can use to override what is
156 # Create a function that we can use to override what is
148 # normally the ignore matcher. We've already checked
157 # normally the ignore matcher. We've already checked
@@ -153,7 +162,7 b' def reposetup(ui, repo):'
153 return False
162 return False
154
163
155 m = copy.copy(match)
164 m = copy.copy(match)
156 m._files = [tostandin(f) for f in m._files]
165 m._files = tostandins(m._files)
157
166
158 # Get ignored files here even if we weren't asked for them; we
167 # Get ignored files here even if we weren't asked for them; we
159 # must use the result here for filtering later
168 # must use the result here for filtering later
@@ -65,6 +65,21 b' Commit preserved largefile contents.'
65 $ cat sub/large2
65 $ cat sub/large2
66 large22
66 large22
67
67
68 Test status, subdir and unknown files
69
70 $ echo unknown > sub/unknown
71 $ hg st --all
72 ? sub/unknown
73 C large1
74 C normal1
75 C sub/large2
76 C sub/normal2
77 $ hg st --all sub
78 ? sub/unknown
79 C sub/large2
80 C sub/normal2
81 $ rm sub/unknown
82
68 Remove both largefiles and normal files.
83 Remove both largefiles and normal files.
69
84
70 $ hg remove normal1 large1
85 $ hg remove normal1 large1
General Comments 0
You need to be logged in to leave comments. Login now