annotate hgext/largefiles/reposetup.py @ 15170:c1a4a3220711

largefiles: fix over-long lines
author Matt Mackall <mpm@selenic.com>
date Thu, 29 Sep 2011 17:04:57 -0500
parents cfccd3bee7b3
children 547da6115d1d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
1 # Copyright 2009-2010 Gregory P. Ward
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
2 # Copyright 2009-2010 Intelerad Medical Systems Incorporated
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
3 # Copyright 2010-2011 Fog Creek Software
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
4 # Copyright 2010-2011 Unity Technologies
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
5 #
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
6 # This software may be used and distributed according to the terms of the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
7 # GNU General Public License version 2 or any later version.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
8
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
9 '''setup for largefiles repositories: reposetup'''
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
10 import copy
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
11 import types
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
12 import os
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
13 import re
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
14
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
15 from mercurial import context, error, manifest, match as match_, \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
16 node, util
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
17 from mercurial.i18n import _
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
18
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
19 import lfcommands
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
20 import proto
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
21 import lfutil
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
22
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
23 def reposetup(ui, repo):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
24 # wire repositories should be given new wireproto functions but not the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
25 # other largefiles modifications
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
26 if not repo.local():
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
27 return proto.wirereposetup(ui, repo)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
28
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
29 for name in ('status', 'commitctx', 'commit', 'push'):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
30 method = getattr(repo, name)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
31 #if not (isinstance(method, types.MethodType) and
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
32 # method.im_func is repo.__class__.commitctx.im_func):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
33 if isinstance(method, types.FunctionType) and method.func_name == \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
34 'wrap':
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
35 ui.warn(_('largefiles: repo method %r appears to have already been'
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
36 ' wrapped by another extension: '
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
37 'largefiles may behave incorrectly\n')
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
38 % name)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
39
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
40 class lfiles_repo(repo.__class__):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
41 lfstatus = False
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
42 def status_nolfiles(self, *args, **kwargs):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
43 return super(lfiles_repo, self).status(*args, **kwargs)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
44
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
45 # When lfstatus is set, return a context that gives the names of lfiles
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
46 # instead of their corresponding standins and identifies the lfiles as
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
47 # always binary, regardless of their actual contents.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
48 def __getitem__(self, changeid):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
49 ctx = super(lfiles_repo, self).__getitem__(changeid)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
50 if self.lfstatus:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
51 class lfiles_manifestdict(manifest.manifestdict):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
52 def __contains__(self, filename):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
53 if super(lfiles_manifestdict,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
54 self).__contains__(filename):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
55 return True
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
56 return super(lfiles_manifestdict,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
57 self).__contains__(lfutil.shortname+'/' + filename)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
58 class lfiles_ctx(ctx.__class__):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
59 def files(self):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
60 filenames = super(lfiles_ctx, self).files()
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15168
diff changeset
61 return [re.sub('^\\'+lfutil.shortname+'/', '',
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15168
diff changeset
62 filename) for filename in filenames]
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
63 def manifest(self):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
64 man1 = super(lfiles_ctx, self).manifest()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
65 man1.__class__ = lfiles_manifestdict
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
66 return man1
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
67 def filectx(self, path, fileid=None, filelog=None):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
68 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
69 result = super(lfiles_ctx, self).filectx(path,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
70 fileid, filelog)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
71 except error.LookupError:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
72 # Adding a null character will cause Mercurial to
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
73 # identify this as a binary file.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
74 result = super(lfiles_ctx, self).filectx(
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
75 lfutil.shortname + '/' + path, fileid,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
76 filelog)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
77 olddata = result.data
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
78 result.data = lambda: olddata() + '\0'
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
79 return result
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
80 ctx.__class__ = lfiles_ctx
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
81 return ctx
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
82
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
83 # Figure out the status of big files and insert them into the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
84 # appropriate list in the result. Also removes standin files from
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
85 # the listing. This function reverts to the original status if
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
86 # self.lfstatus is False
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
87 def status(self, node1='.', node2=None, match=None, ignored=False,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
88 clean=False, unknown=False, listsubrepos=False):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
89 listignored, listclean, listunknown = ignored, clean, unknown
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
90 if not self.lfstatus:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
91 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
92 return super(lfiles_repo, self).status(node1, node2, match,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
93 listignored, listclean, listunknown, listsubrepos)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
94 except TypeError:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
95 return super(lfiles_repo, self).status(node1, node2, match,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
96 listignored, listclean, listunknown)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
97 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
98 # some calls in this function rely on the old version of status
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
99 self.lfstatus = False
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
100 if isinstance(node1, context.changectx):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
101 ctx1 = node1
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
102 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
103 ctx1 = repo[node1]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
104 if isinstance(node2, context.changectx):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
105 ctx2 = node2
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
106 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
107 ctx2 = repo[node2]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
108 working = ctx2.rev() is None
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
109 parentworking = working and ctx1 == self['.']
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
110
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
111 def inctx(file, ctx):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
112 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
113 if ctx.rev() is None:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
114 return file in ctx.manifest()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
115 ctx[file]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
116 return True
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
117 except:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
118 return False
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
119
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
120 # create a copy of match that matches standins instead of
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
121 # lfiles if matcher not set then it is the always matcher so
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
122 # overwrite that
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
123 if match is None:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
124 match = match_.always(self.root, self.getcwd())
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
125
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
126 def tostandin(file):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
127 if inctx(lfutil.standin(file), ctx2):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
128 return lfutil.standin(file)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
129 return file
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
130
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
131 m = copy.copy(match)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
132 m._files = [tostandin(f) for f in m._files]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
133
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
134 # get ignored clean and unknown but remove them later if they
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
135 # were not asked for
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
136 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
137 result = super(lfiles_repo, self).status(node1, node2, m,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
138 True, True, True, listsubrepos)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
139 except TypeError:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
140 result = super(lfiles_repo, self).status(node1, node2, m,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
141 True, True, True)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
142 if working:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
143 # Hold the wlock while we read lfiles and update the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
144 # lfdirstate
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
145 wlock = repo.wlock()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
146 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
147 # Any non lfiles that were explicitly listed must be
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
148 # taken out or lfdirstate.status will report an error.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
149 # The status of these files was already computed using
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
150 # super's status.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
151 lfdirstate = lfutil.openlfdirstate(ui, self)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
152 match._files = [f for f in match._files if f in
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
153 lfdirstate]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
154 s = lfdirstate.status(match, [], listignored,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
155 listclean, listunknown)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
156 (unsure, modified, added, removed, missing, unknown,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
157 ignored, clean) = s
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
158 if parentworking:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
159 for lfile in unsure:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
160 if ctx1[lfutil.standin(lfile)].data().strip() \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
161 != lfutil.hashfile(self.wjoin(lfile)):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
162 modified.append(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
163 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
164 clean.append(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
165 lfdirstate.normal(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
166 lfdirstate.write()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
167 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
168 tocheck = unsure + modified + added + clean
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
169 modified, added, clean = [], [], []
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
170
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
171 for lfile in tocheck:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
172 standin = lfutil.standin(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
173 if inctx(standin, ctx1):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
174 if ctx1[standin].data().strip() != \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
175 lfutil.hashfile(self.wjoin(lfile)):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
176 modified.append(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
177 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
178 clean.append(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
179 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
180 added.append(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
181 finally:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
182 wlock.release()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
183
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
184 for standin in ctx1.manifest():
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
185 if not lfutil.isstandin(standin):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
186 continue
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
187 lfile = lfutil.splitstandin(standin)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
188 if not match(lfile):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
189 continue
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
190 if lfile not in lfdirstate:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
191 removed.append(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
192 # Handle unknown and ignored differently
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
193 lfiles = (modified, added, removed, missing, [], [], clean)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
194 result = list(result)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
195 # Unknown files
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
196 result[4] = [f for f in unknown if repo.dirstate[f] == '?'\
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
197 and not lfutil.isstandin(f)]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
198 # Ignored files must be ignored by both the dirstate and
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
199 # lfdirstate
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
200 result[5] = set(ignored).intersection(set(result[5]))
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
201 # combine normal files and lfiles
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
202 normals = [[fn for fn in filelist if not \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
203 lfutil.isstandin(fn)] for filelist in result]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
204 result = [sorted(list1 + list2) for (list1, list2) in \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
205 zip(normals, lfiles)]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
206 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
207 def toname(f):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
208 if lfutil.isstandin(f):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
209 return lfutil.splitstandin(f)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
210 return f
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
211 result = [[toname(f) for f in items] for items in result]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
212
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
213 if not listunknown:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
214 result[4] = []
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
215 if not listignored:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
216 result[5] = []
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
217 if not listclean:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
218 result[6] = []
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
219 self.lfstatus = True
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
220 return result
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
221
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
222 # This call happens after a commit has occurred. Copy all of the lfiles
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
223 # into the cache
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
224 def commitctx(self, *args, **kwargs):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
225 node = super(lfiles_repo, self).commitctx(*args, **kwargs)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
226 ctx = self[node]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
227 for filename in ctx.files():
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
228 if lfutil.isstandin(filename) and filename in ctx.manifest():
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
229 realfile = lfutil.splitstandin(filename)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
230 lfutil.copytocache(self, ctx.node(), realfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
231
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
232 return node
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
233
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
234 # This call happens before a commit has occurred. The lfile standins
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
235 # have not had their contents updated (to reflect the hash of their
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
236 # lfile). Do that here.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
237 def commit(self, text="", user=None, date=None, match=None,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
238 force=False, editor=False, extra={}):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
239 orig = super(lfiles_repo, self).commit
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
240
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
241 wlock = repo.wlock()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
242 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
243 if getattr(repo, "_isrebasing", False):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
244 # We have to take the time to pull down the new lfiles now.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
245 # Otherwise if we are rebasing, any lfiles that were
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
246 # modified in the changesets we are rebasing on top of get
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
247 # overwritten either by the rebase or in the first commit
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
248 # after the rebase.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
249 lfcommands.updatelfiles(repo.ui, repo)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
250 # Case 1: user calls commit with no specific files or
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
251 # include/exclude patterns: refresh and commit everything.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
252 if (match is None) or (not match.anypats() and not \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
253 match.files()):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
254 lfiles = lfutil.listlfiles(self)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
255 lfdirstate = lfutil.openlfdirstate(ui, self)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
256 # this only loops through lfiles that exist (not
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
257 # removed/renamed)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
258 for lfile in lfiles:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
259 if os.path.exists(self.wjoin(lfutil.standin(lfile))):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
260 # this handles the case where a rebase is being
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
261 # performed and the working copy is not updated
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
262 # yet.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
263 if os.path.exists(self.wjoin(lfile)):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
264 lfutil.updatestandin(self,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
265 lfutil.standin(lfile))
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
266 lfdirstate.normal(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
267 for lfile in lfdirstate:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
268 if not os.path.exists(
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
269 repo.wjoin(lfutil.standin(lfile))):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
270 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
271 # Mercurial >= 1.9
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
272 lfdirstate.drop(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
273 except AttributeError:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
274 # Mercurial <= 1.8
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
275 lfdirstate.forget(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
276 lfdirstate.write()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
277
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
278 return orig(text=text, user=user, date=date, match=match,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
279 force=force, editor=editor, extra=extra)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
280
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
281 for file in match.files():
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
282 if lfutil.isstandin(file):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
283 raise util.Abort(
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
284 "Don't commit largefile standin. Commit largefile.")
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
285
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
286 # Case 2: user calls commit with specified patterns: refresh
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
287 # any matching big files.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
288 smatcher = lfutil.composestandinmatcher(self, match)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
289 standins = lfutil.dirstate_walk(self.dirstate, smatcher)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
290
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
291 # No matching big files: get out of the way and pass control to
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
292 # the usual commit() method.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
293 if not standins:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
294 return orig(text=text, user=user, date=date, match=match,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
295 force=force, editor=editor, extra=extra)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
296
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
297 # Refresh all matching big files. It's possible that the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
298 # commit will end up failing, in which case the big files will
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
299 # stay refreshed. No harm done: the user modified them and
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
300 # asked to commit them, so sooner or later we're going to
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
301 # refresh the standins. Might as well leave them refreshed.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
302 lfdirstate = lfutil.openlfdirstate(ui, self)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
303 for standin in standins:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
304 lfile = lfutil.splitstandin(standin)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
305 if lfdirstate[lfile] <> 'r':
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
306 lfutil.updatestandin(self, standin)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
307 lfdirstate.normal(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
308 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
309 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
310 # Mercurial >= 1.9
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
311 lfdirstate.drop(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
312 except AttributeError:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
313 # Mercurial <= 1.8
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
314 lfdirstate.forget(lfile)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
315 lfdirstate.write()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
316
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
317 # Cook up a new matcher that only matches regular files or
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
318 # standins corresponding to the big files requested by the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
319 # user. Have to modify _files to prevent commit() from
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
320 # complaining "not tracked" for big files.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
321 lfiles = lfutil.listlfiles(repo)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
322 match = copy.copy(match)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
323 orig_matchfn = match.matchfn
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
324
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
325 # Check both the list of lfiles and the list of standins
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
326 # because if a lfile was removed, it won't be in the list of
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
327 # lfiles at this point
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
328 match._files += sorted(standins)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
329
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
330 actualfiles = []
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
331 for f in match._files:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
332 fstandin = lfutil.standin(f)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
333
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
334 # Ignore known lfiles and standins
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
335 if f in lfiles or fstandin in standins:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
336 continue
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
337
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
338 # Append directory separator to avoid collisions
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
339 if not fstandin.endswith(os.sep):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
340 fstandin += os.sep
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
341
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
342 # Prevalidate matching standin directories
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
343 if lfutil.any_(st for st in match._files if \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
344 st.startswith(fstandin)):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
345 continue
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
346 actualfiles.append(f)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
347 match._files = actualfiles
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
348
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
349 def matchfn(f):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
350 if orig_matchfn(f):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
351 return f not in lfiles
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
352 else:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
353 return f in standins
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
354
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
355 match.matchfn = matchfn
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
356 return orig(text=text, user=user, date=date, match=match,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
357 force=force, editor=editor, extra=extra)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
358 finally:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
359 wlock.release()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
360
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
361 def push(self, remote, force=False, revs=None, newbranch=False):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
362 o = lfutil.findoutgoing(repo, remote, force)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
363 if o:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
364 toupload = set()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
365 o = repo.changelog.nodesbetween(o, revs)[0]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
366 for n in o:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
367 parents = [p for p in repo.changelog.parents(n) if p != \
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
368 node.nullid]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
369 ctx = repo[n]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
370 files = set(ctx.files())
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
371 if len(parents) == 2:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
372 mc = ctx.manifest()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
373 mp1 = ctx.parents()[0].manifest()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
374 mp2 = ctx.parents()[1].manifest()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
375 for f in mp1:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
376 if f not in mc:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
377 files.add(f)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
378 for f in mp2:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
379 if f not in mc:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
380 files.add(f)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
381 for f in mc:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
382 if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
383 None):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
384 files.add(f)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
385
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
386 toupload = toupload.union(set([ctx[f].data().strip() for f\
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
387 in files if lfutil.isstandin(f) and f in ctx]))
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
388 lfcommands.uploadlfiles(ui, self, remote, toupload)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
389 # Mercurial >= 1.6 takes the newbranch argument, try that first.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
390 try:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
391 return super(lfiles_repo, self).push(remote, force, revs,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
392 newbranch)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
393 except TypeError:
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
394 return super(lfiles_repo, self).push(remote, force, revs)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
395
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
396 repo.__class__ = lfiles_repo
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
397
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
398 def checkrequireslfiles(ui, repo, **kwargs):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
399 if 'largefiles' not in repo.requirements and lfutil.any_(
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
400 lfutil.shortname+'/' in f[0] for f in repo.store.datafiles()):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
401 # work around bug in mercurial 1.9 whereby requirements is a list
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
402 # on newly-cloned repos
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
403 repo.requirements = set(repo.requirements)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
404
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
405 repo.requirements |= set(['largefiles'])
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
406 repo._writerequirements()
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
407
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
408 checkrequireslfiles(ui, repo)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
409
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
410 ui.setconfig('hooks', 'changegroup.lfiles', checkrequireslfiles)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
411 ui.setconfig('hooks', 'commit.lfiles', checkrequireslfiles)