Mercurial > hg
comparison hgext/largefiles/overrides.py @ 32157:09fb3d3b1b3a
py3: abuse r'' to access keys in keyword arguments
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 03 May 2017 15:41:28 +0530 |
parents | 9e67ce5c4fd0 |
children | 8a87bfc5bebb |
comparison
equal
deleted
inserted
replaced
32156:6c0ae9683437 | 32157:09fb3d3b1b3a |
---|---|
103 to restore the original matchfn.''' | 103 to restore the original matchfn.''' |
104 scmutil.matchandpats = getattr(scmutil.matchandpats, 'oldmatchandpats', | 104 scmutil.matchandpats = getattr(scmutil.matchandpats, 'oldmatchandpats', |
105 scmutil.matchandpats) | 105 scmutil.matchandpats) |
106 | 106 |
107 def addlargefiles(ui, repo, isaddremove, matcher, **opts): | 107 def addlargefiles(ui, repo, isaddremove, matcher, **opts): |
108 large = opts.get('large') | 108 large = opts.get(r'large') |
109 lfsize = lfutil.getminsize( | 109 lfsize = lfutil.getminsize( |
110 ui, lfutil.islfilesrepo(repo), opts.get('lfsize')) | 110 ui, lfutil.islfilesrepo(repo), opts.get(r'lfsize')) |
111 | 111 |
112 lfmatcher = None | 112 lfmatcher = None |
113 if lfutil.islfilesrepo(repo): | 113 if lfutil.islfilesrepo(repo): |
114 lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) | 114 lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) |
115 if lfpats: | 115 if lfpats: |
256 raise error.Abort(_('--normal cannot be used with --large')) | 256 raise error.Abort(_('--normal cannot be used with --large')) |
257 return orig(ui, repo, *pats, **opts) | 257 return orig(ui, repo, *pats, **opts) |
258 | 258 |
259 def cmdutiladd(orig, ui, repo, matcher, prefix, explicitonly, **opts): | 259 def cmdutiladd(orig, ui, repo, matcher, prefix, explicitonly, **opts): |
260 # The --normal flag short circuits this override | 260 # The --normal flag short circuits this override |
261 if opts.get('normal'): | 261 if opts.get(r'normal'): |
262 return orig(ui, repo, matcher, prefix, explicitonly, **opts) | 262 return orig(ui, repo, matcher, prefix, explicitonly, **opts) |
263 | 263 |
264 ladded, lbad = addlargefiles(ui, repo, False, matcher, **opts) | 264 ladded, lbad = addlargefiles(ui, repo, False, matcher, **opts) |
265 normalmatcher = composenormalfilematcher(matcher, repo[None].manifest(), | 265 normalmatcher = composenormalfilematcher(matcher, repo[None].manifest(), |
266 ladded) | 266 ladded) |