Show More
@@ -27,7 +27,6 b' from mercurial import (' | |||
|
27 | 27 | lock, |
|
28 | 28 | logcmdutil, |
|
29 | 29 | match as matchmod, |
|
30 | pycompat, | |
|
31 | 30 | scmutil, |
|
32 | 31 | util, |
|
33 | 32 | ) |
@@ -87,12 +86,11 b' def lfconvert(ui, src, dest, *pats, **op' | |||
|
87 | 86 | Use --to-normal to convert largefiles back to normal files; after |
|
88 | 87 | this, the DEST repository can be used without largefiles at all.""" |
|
89 | 88 | |
|
90 | opts = pycompat.byteskwargs(opts) | |
|
91 | if opts[b'to_normal']: | |
|
89 | if opts['to_normal']: | |
|
92 | 90 | tolfile = False |
|
93 | 91 | else: |
|
94 | 92 | tolfile = True |
|
95 |
size = lfutil.getminsize(ui, True, opts.get( |
|
|
93 | size = lfutil.getminsize(ui, True, opts.get('size'), default=None) | |
|
96 | 94 | |
|
97 | 95 | if not hg.islocal(src): |
|
98 | 96 | raise error.Abort(_(b'%s is not a local Mercurial repo') % src) |
@@ -1717,11 +1717,10 b' def overridetransplant(orig, ui, repo, *' | |||
|
1717 | 1717 | |
|
1718 | 1718 | @eh.wrapcommand(b'cat') |
|
1719 | 1719 | def overridecat(orig, ui, repo, file1, *pats, **opts): |
|
1720 | opts = pycompat.byteskwargs(opts) | |
|
1721 | ctx = logcmdutil.revsingle(repo, opts.get(b'rev')) | |
|
1720 | ctx = logcmdutil.revsingle(repo, opts.get('rev')) | |
|
1722 | 1721 | err = 1 |
|
1723 | 1722 | notbad = set() |
|
1724 | m = scmutil.match(ctx, (file1,) + pats, opts) | |
|
1723 | m = scmutil.match(ctx, (file1,) + pats, pycompat.byteskwargs(opts)) | |
|
1725 | 1724 | origmatchfn = m.matchfn |
|
1726 | 1725 | |
|
1727 | 1726 | def lfmatchfn(f): |
@@ -1758,12 +1757,12 b' def overridecat(orig, ui, repo, file1, *' | |||
|
1758 | 1757 | m.visitdir = lfvisitdirfn |
|
1759 | 1758 | |
|
1760 | 1759 | for f in ctx.walk(m): |
|
1761 |
with cmdutil.makefileobj(ctx, opts.get( |
|
|
1760 | with cmdutil.makefileobj(ctx, opts.get('output'), pathname=f) as fp: | |
|
1762 | 1761 | lf = lfutil.splitstandin(f) |
|
1763 | 1762 | if lf is None or origmatchfn(f): |
|
1764 | 1763 | # duplicating unreachable code from commands.cat |
|
1765 | 1764 | data = ctx[f].data() |
|
1766 |
if opts.get( |
|
|
1765 | if opts.get('decode'): | |
|
1767 | 1766 | data = repo.wwritedata(f, data) |
|
1768 | 1767 | fp.write(data) |
|
1769 | 1768 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now