##// END OF EJS Templates
largefiles: use constant for '.hglf/'...
Mads Kiilerich -
r18151:90ad387d default
parent child Browse files
Show More
@@ -18,6 +18,7 b' from mercurial import dirstate, httpconn'
18 18 from mercurial.i18n import _
19 19
20 20 shortname = '.hglf'
21 shortnameslash = shortname + '/'
21 22 longname = 'largefiles'
22 23
23 24
@@ -291,12 +292,12 b' def standin(filename):'
291 292 # 2) Join with '/' because that's what dirstate always uses, even on
292 293 # Windows. Change existing separator to '/' first in case we are
293 294 # passed filenames from an external source (like the command line).
294 return shortname + '/' + util.pconvert(filename)
295 return shortnameslash + util.pconvert(filename)
295 296
296 297 def isstandin(filename):
297 298 '''Return true if filename is a big file standin. filename must be
298 299 in Mercurial's internal form (slash-separated).'''
299 return filename.startswith(shortname + '/')
300 return filename.startswith(shortnameslash)
300 301
301 302 def splitstandin(filename):
302 303 # Split on / because that's what dirstate always uses, even on Windows.
@@ -425,7 +426,7 b' def unixpath(path):'
425 426
426 427 def islfilesrepo(repo):
427 428 if ('largefiles' in repo.requirements and
428 util.any(shortname + '/' in f[0] for f in repo.store.datafiles())):
429 util.any(shortnameslash in f[0] for f in repo.store.datafiles())):
429 430 return True
430 431
431 432 return util.any(openlfdirstate(repo.ui, repo, False))
General Comments 0
You need to be logged in to leave comments. Login now