##// END OF EJS Templates
largefiles: in overridelog, use non-lf matcher for patch generation (issue4334)...
Siddharth Agarwal -
r22169:35cc5b07 stable
parent child Browse files
Show More
@@ -299,11 +299,25 b' def overridelog(orig, ui, repo, *pats, *'
299
299
300 return m, pats
300 return m, pats
301
301
302 # For hg log --patch, the match object is used in two different senses:
303 # (1) to determine what revisions should be printed out, and
304 # (2) to determine what files to print out diffs for.
305 # The magic matchandpats override should be used for case (1) but not for
306 # case (2).
307 def overridemakelogfilematcher(repo, pats, opts):
308 pctx = repo[None]
309 match, pats = oldmatchandpats(pctx, pats, opts)
310 return lambda rev: match
311
302 oldmatchandpats = installmatchandpatsfn(overridematchandpats)
312 oldmatchandpats = installmatchandpatsfn(overridematchandpats)
313 oldmakelogfilematcher = cmdutil._makenofollowlogfilematcher
314 setattr(cmdutil, '_makenofollowlogfilematcher', overridemakelogfilematcher)
315
303 try:
316 try:
304 return orig(ui, repo, *pats, **opts)
317 return orig(ui, repo, *pats, **opts)
305 finally:
318 finally:
306 restorematchandpatsfn()
319 restorematchandpatsfn()
320 setattr(cmdutil, '_makenofollowlogfilematcher', oldmakelogfilematcher)
307
321
308 def overrideverify(orig, ui, repo, *pats, **opts):
322 def overrideverify(orig, ui, repo, *pats, **opts):
309 large = opts.pop('large', False)
323 large = opts.pop('large', False)
@@ -724,6 +724,81 b' Test graph log'
724 |
724 |
725 o 0:30d30fe6a5be add files
725 o 0:30d30fe6a5be add files
726
726
727
728 Test log with --patch
729 $ hg log --patch -r 6::7
730 changeset: 6:4355d653f84f
731 user: test
732 date: Thu Jan 01 00:00:00 1970 +0000
733 summary: edit files yet again
734
735 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3
736 --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
737 +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
738 @@ -1,1 +1,1 @@
739 -baaf12afde9d8d67f25dab6dced0d2bf77dba47c
740 +7838695e10da2bb75ac1156565f40a2595fa2fa0
741 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4
742 --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
743 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
744 @@ -1,1 +1,1 @@
745 -aeb2210d19f02886dde00dac279729a48471e2f9
746 +971fb41e78fea4f8e0ba5244784239371cb00591
747 diff -r 9d5af5072dbd -r 4355d653f84f normal3
748 --- a/normal3 Thu Jan 01 00:00:00 1970 +0000
749 +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000
750 @@ -1,1 +1,1 @@
751 -normal3
752 +normal33
753 diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4
754 --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
755 +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
756 @@ -1,1 +1,1 @@
757 -normal4
758 +normal44
759
760 changeset: 7:daea875e9014
761 tag: tip
762 user: test
763 date: Thu Jan 01 00:00:00 1970 +0000
764 summary: add/edit more largefiles
765
766 diff -r 4355d653f84f -r daea875e9014 .hglf/large3
767 --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
768 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
769 @@ -1,1 +0,0 @@
770 -7838695e10da2bb75ac1156565f40a2595fa2fa0
771 diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6
772 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
773 +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000
774 @@ -0,0 +1,1 @@
775 +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30
776 diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7
777 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
778 +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000
779 @@ -0,0 +1,1 @@
780 +bb3151689acb10f0c3125c560d5e63df914bc1af
781
782
783 $ hg log --patch -r 6::7 sub/
784 changeset: 6:4355d653f84f
785 user: test
786 date: Thu Jan 01 00:00:00 1970 +0000
787 summary: edit files yet again
788
789 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4
790 --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
791 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
792 @@ -1,1 +1,1 @@
793 -aeb2210d19f02886dde00dac279729a48471e2f9
794 +971fb41e78fea4f8e0ba5244784239371cb00591
795 diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4
796 --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
797 +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
798 @@ -1,1 +1,1 @@
799 -normal4
800 +normal44
801
727 $ cat sub/normal4
802 $ cat sub/normal4
728 normal44
803 normal44
729 $ cat sub/large4
804 $ cat sub/large4
General Comments 0
You need to be logged in to leave comments. Login now