##// END OF EJS Templates
largefiles: don't prefix standin patterns with '.hglf' when logging...
Matt Harbison -
r24207:d90e3faf default
parent child Browse files
Show More
@@ -319,11 +319,21 b' def overridelog(orig, ui, repo, *pats, *'
319 back = (m._cwd.count('/') + 1) * '../'
319 back = (m._cwd.count('/') + 1) * '../'
320
320
321 def tostandin(f):
321 def tostandin(f):
322 # The file may already be a standin, so trucate the back
323 # escaping and test before mangling it. This avoids turning
324 # 'glob:../.hglf/foo*' into 'glob:../.hglf/../.hglf/foo*'.
325 if f.startswith(back) and lfutil.splitstandin(f[len(back):]):
326 return f
327
322 return back + lfutil.standin(m._cwd + '/' + f)
328 return back + lfutil.standin(m._cwd + '/' + f)
323
329
324 pats.update(fixpats(f, tostandin) for f in p)
330 pats.update(fixpats(f, tostandin) for f in p)
325 else:
331 else:
326 pats.update(fixpats(f) for f in p)
332 def tostandin(f):
333 if lfutil.splitstandin(f):
334 return f
335 return lfutil.standin(f)
336 pats.update(fixpats(f, tostandin) for f in p)
327
337
328 for i in range(0, len(m._files)):
338 for i in range(0, len(m._files)):
329 # Don't add '.hglf' to m.files, since that is already covered by '.'
339 # Don't add '.hglf' to m.files, since that is already covered by '.'
@@ -351,6 +361,7 b' def overridelog(orig, ui, repo, *pats, *'
351 return r
361 return r
352 m.matchfn = lfmatchfn
362 m.matchfn = lfmatchfn
353
363
364 ui.debug('updated patterns: %s\n' % sorted(pats))
354 return m, pats
365 return m, pats
355
366
356 # For hg log --patch, the match object is used in two different senses:
367 # For hg log --patch, the match object is used in two different senses:
@@ -466,14 +466,22 b' Test actions on largefiles using relativ'
466 date: Thu Jan 01 00:00:00 1970 +0000
466 date: Thu Jan 01 00:00:00 1970 +0000
467 summary: anotherlarge
467 summary: anotherlarge
468
468
469 $ hg log -G glob:another*
469 $ hg --debug log -T '{rev}: {desc}\n' -G glob:another*
470 @ changeset: 1:9627a577c5e9
470 updated patterns: ['glob:../.hglf/sub/another*', 'glob:another*']
471 | tag: tip
471 @ 1: anotherlarge
472 | user: test
473 | date: Thu Jan 01 00:00:00 1970 +0000
474 | summary: anotherlarge
475 |
472 |
476
473
474 #if no-msys
475 $ hg --debug log -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys
476 updated patterns: ['glob:../.hglf/sub/another*']
477 1: anotherlarge
478
479 $ hg --debug log -G -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys
480 updated patterns: ['glob:../.hglf/sub/another*']
481 @ 1: anotherlarge
482 |
483 #endif
484
477 $ echo more >> anotherlarge
485 $ echo more >> anotherlarge
478 $ hg st .
486 $ hg st .
479 M anotherlarge
487 M anotherlarge
@@ -46,12 +46,9 b' changeset graph'
46 $ hg ci -me -d '5 0'
46 $ hg ci -me -d '5 0'
47
47
48 Make sure largefiles doesn't interfere with logging a regular file
48 Make sure largefiles doesn't interfere with logging a regular file
49 $ hg log a --config extensions.largefiles=
49 $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles=
50 changeset: 0:9161b9aeaf16
50 updated patterns: ['.hglf/a', 'a']
51 user: test
51 0: a
52 date: Thu Jan 01 00:00:01 1970 +0000
53 summary: a
54
55 $ hg log a
52 $ hg log a
56 changeset: 0:9161b9aeaf16
53 changeset: 0:9161b9aeaf16
57 user: test
54 user: test
@@ -69,17 +66,11 b" Make sure largefiles doesn't interfere w"
69 date: Thu Jan 01 00:00:01 1970 +0000
66 date: Thu Jan 01 00:00:01 1970 +0000
70 summary: a
67 summary: a
71
68
72 $ hg log glob:a* --config extensions.largefiles=
69 $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles=
73 changeset: 3:2ca5ba701980
70 updated patterns: ['glob:.hglf/a*', 'glob:a*']
74 user: test
71 3: d
75 date: Thu Jan 01 00:00:04 1970 +0000
72 0: a
76 summary: d
73
77
78 changeset: 0:9161b9aeaf16
79 user: test
80 date: Thu Jan 01 00:00:01 1970 +0000
81 summary: a
82
83 log on directory
74 log on directory
84
75
85 $ hg log dir
76 $ hg log dir
General Comments 0
You need to be logged in to leave comments. Login now