##// END OF EJS Templates
largefiles: handle logging from outside the repo...
Matt Harbison -
r24208:e6b0de02 default
parent child Browse files
Show More
@@ -313,19 +313,25 b' def overridelog(orig, ui, repo, *pats, *'
313 return tostandin(kindpat[1])
313 return tostandin(kindpat[1])
314
314
315 if m._cwd:
315 if m._cwd:
316 if os.path.isabs(m._cwd):
316 hglf = lfutil.shortname
317 # TODO: handle largefile magic when invoked from other cwd
317 back = util.pconvert(m.rel(hglf)[:-len(hglf)])
318 return matchandpats
319 back = (m._cwd.count('/') + 1) * '../'
320
318
321 def tostandin(f):
319 def tostandin(f):
322 # The file may already be a standin, so trucate the back
320 # The file may already be a standin, so trucate the back
323 # escaping and test before mangling it. This avoids turning
321 # prefix and test before mangling it. This avoids turning
324 # 'glob:../.hglf/foo*' into 'glob:../.hglf/../.hglf/foo*'.
322 # 'glob:../.hglf/foo*' into 'glob:../.hglf/../.hglf/foo*'.
325 if f.startswith(back) and lfutil.splitstandin(f[len(back):]):
323 if f.startswith(back) and lfutil.splitstandin(f[len(back):]):
326 return f
324 return f
327
325
328 return back + lfutil.standin(m._cwd + '/' + f)
326 # An absolute path is from outside the repo, so truncate the
327 # path to the root before building the standin. Otherwise cwd
328 # is somewhere in the repo, relative to root, and needs to be
329 # prepended before building the standin.
330 if os.path.isabs(m._cwd):
331 f = f[len(back):]
332 else:
333 f = m._cwd + '/' + f
334 return back + lfutil.standin(f)
329
335
330 pats.update(fixpats(f, tostandin) for f in p)
336 pats.update(fixpats(f, tostandin) for f in p)
331 else:
337 else:
@@ -451,6 +451,10 b' Test actions on largefiles using relativ'
451 date: Thu Jan 01 00:00:00 1970 +0000
451 date: Thu Jan 01 00:00:00 1970 +0000
452 summary: anotherlarge
452 summary: anotherlarge
453
453
454 $ hg --debug log -T '{rev}: {desc}\n' ../sub/anotherlarge
455 updated patterns: ['../.hglf/sub/../sub/anotherlarge', '../sub/anotherlarge']
456 1: anotherlarge
457
454 $ hg log -G anotherlarge
458 $ hg log -G anotherlarge
455 @ changeset: 1:9627a577c5e9
459 @ changeset: 1:9627a577c5e9
456 | tag: tip
460 | tag: tip
@@ -510,6 +514,15 b' Test glob logging from the root dir'
510
514
511 $ cd ..
515 $ cd ..
512
516
517 Log from outer space
518 $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/sub/anotherlarge'
519 updated patterns: ['addrm2/.hglf/sub/anotherlarge', 'addrm2/sub/anotherlarge']
520 1: anotherlarge
521 $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/.hglf/sub/anotherlarge'
522 updated patterns: ['addrm2/.hglf/sub/anotherlarge']
523 1: anotherlarge
524
525
513 Check error message while exchange
526 Check error message while exchange
514 =========================================================
527 =========================================================
515
528
General Comments 0
You need to be logged in to leave comments. Login now