Show More
@@ -12,7 +12,7 b' import os' | |||||
12 |
|
12 | |||
13 | from mercurial import error, manifest, match as match_, util |
|
13 | from mercurial import error, manifest, match as match_, util | |
14 | from mercurial.i18n import _ |
|
14 | from mercurial.i18n import _ | |
15 | from mercurial import scmutil |
|
15 | from mercurial import scmutil, localrepo | |
16 |
|
16 | |||
17 | import lfcommands |
|
17 | import lfcommands | |
18 | import lfutil |
|
18 | import lfutil | |
@@ -34,7 +34,7 b' def reposetup(ui, repo):' | |||||
34 | # their actual contents. |
|
34 | # their actual contents. | |
35 | def __getitem__(self, changeid): |
|
35 | def __getitem__(self, changeid): | |
36 | ctx = super(lfilesrepo, self).__getitem__(changeid) |
|
36 | ctx = super(lfilesrepo, self).__getitem__(changeid) | |
37 |
if self. |
|
37 | if self.lfstatus: | |
38 | class lfilesmanifestdict(manifest.manifestdict): |
|
38 | class lfilesmanifestdict(manifest.manifestdict): | |
39 | def __contains__(self, filename): |
|
39 | def __contains__(self, filename): | |
40 | orig = super(lfilesmanifestdict, self).__contains__ |
|
40 | orig = super(lfilesmanifestdict, self).__contains__ | |
@@ -72,20 +72,19 b' def reposetup(ui, repo):' | |||||
72 | # appropriate list in the result. Also removes standin files |
|
72 | # appropriate list in the result. Also removes standin files | |
73 | # from the listing. Revert to the original status if |
|
73 | # from the listing. Revert to the original status if | |
74 | # self.lfstatus is False. |
|
74 | # self.lfstatus is False. | |
|
75 | # XXX large file status is buggy when used on repo proxy. | |||
|
76 | # XXX this needs to be investigated. | |||
|
77 | @localrepo.unfilteredmethod | |||
75 | def status(self, node1='.', node2=None, match=None, ignored=False, |
|
78 | def status(self, node1='.', node2=None, match=None, ignored=False, | |
76 | clean=False, unknown=False, listsubrepos=False): |
|
79 | clean=False, unknown=False, listsubrepos=False): | |
77 | listignored, listclean, listunknown = ignored, clean, unknown |
|
80 | listignored, listclean, listunknown = ignored, clean, unknown | |
78 | orig = super(lfilesrepo, self).status |
|
81 | orig = super(lfilesrepo, self).status | |
79 |
|
82 | if not self.lfstatus: | ||
80 | # When various overrides set repo.lfstatus, the change is redirected |
|
|||
81 | # to the unfiltered repo, and self.lfstatus is always false when |
|
|||
82 | # this repo is filtered. |
|
|||
83 | if not self.unfiltered().lfstatus: |
|
|||
84 | return orig(node1, node2, match, listignored, listclean, |
|
83 | return orig(node1, node2, match, listignored, listclean, | |
85 | listunknown, listsubrepos) |
|
84 | listunknown, listsubrepos) | |
86 |
|
85 | |||
87 | # some calls in this function rely on the old version of status |
|
86 | # some calls in this function rely on the old version of status | |
88 |
self |
|
87 | self.lfstatus = False | |
89 | ctx1 = self[node1] |
|
88 | ctx1 = self[node1] | |
90 | ctx2 = self[node2] |
|
89 | ctx2 = self[node2] | |
91 | working = ctx2.rev() is None |
|
90 | working = ctx2.rev() is None | |
@@ -241,7 +240,7 b' def reposetup(ui, repo):' | |||||
241 | if wlock: |
|
240 | if wlock: | |
242 | wlock.release() |
|
241 | wlock.release() | |
243 |
|
242 | |||
244 |
self |
|
243 | self.lfstatus = True | |
245 | return scmutil.status(*result) |
|
244 | return scmutil.status(*result) | |
246 |
|
245 | |||
247 | def commitctx(self, ctx, *args, **kwargs): |
|
246 | def commitctx(self, ctx, *args, **kwargs): |
@@ -180,6 +180,13 b' should show copy' | |||||
180 | $ hg st -C |
|
180 | $ hg st -C | |
181 | M bar |
|
181 | M bar | |
182 | foo |
|
182 | foo | |
|
183 | ||||
|
184 | XXX: filtering lfilesrepo.status() in 3.3-rc causes the copy source to not be | |||
|
185 | displayed. | |||
|
186 | $ hg st -C --config extensions.largefiles= | |||
|
187 | M bar | |||
|
188 | foo | |||
|
189 | ||||
183 | $ hg commit -m3 |
|
190 | $ hg commit -m3 | |
184 |
|
191 | |||
185 | should show no parents for tip |
|
192 | should show no parents for tip |
@@ -162,6 +162,14 b' Status with relative path:' | |||||
162 | M ../foo/bar/z.txt |
|
162 | M ../foo/bar/z.txt | |
163 | M ../foo/y.txt |
|
163 | M ../foo/y.txt | |
164 | ? a.txt |
|
164 | ? a.txt | |
|
165 | ||||
|
166 | XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as | |||
|
167 | added instead of modified. | |||
|
168 | $ hg status -S .. --config extensions.largefiles= | |||
|
169 | M ../foo/bar/z.txt | |||
|
170 | M ../foo/y.txt | |||
|
171 | ? a.txt | |||
|
172 | ||||
165 | $ hg diff --nodates -S .. |
|
173 | $ hg diff --nodates -S .. | |
166 | diff -r d254738c5f5e foo/y.txt |
|
174 | diff -r d254738c5f5e foo/y.txt | |
167 | --- a/foo/y.txt |
|
175 | --- a/foo/y.txt |
General Comments 0
You need to be logged in to leave comments.
Login now