##// END OF EJS Templates
py3: abuse r'' to access keys in keyword arguments
Pulkit Goyal -
r32157:09fb3d3b default
parent child Browse files
Show More
@@ -105,9 +105,9 b' def restorematchandpatsfn():'
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):
@@ -258,7 +258,7 b' def overrideadd(orig, ui, repo, *pats, *'
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)
@@ -1878,9 +1878,9 b' class gitsubrepo(abstractsubrepo):'
1878 deleted, unknown, ignored, clean = [], [], [], []
1878 deleted, unknown, ignored, clean = [], [], [], []
1879
1879
1880 command = ['status', '--porcelain', '-z']
1880 command = ['status', '--porcelain', '-z']
1881 if opts.get('unknown'):
1881 if opts.get(r'unknown'):
1882 command += ['--untracked-files=all']
1882 command += ['--untracked-files=all']
1883 if opts.get('ignored'):
1883 if opts.get(r'ignored'):
1884 command += ['--ignored']
1884 command += ['--ignored']
1885 out = self._gitcommand(command)
1885 out = self._gitcommand(command)
1886
1886
@@ -1908,7 +1908,7 b' class gitsubrepo(abstractsubrepo):'
1908 elif st == '!!':
1908 elif st == '!!':
1909 ignored.append(filename1)
1909 ignored.append(filename1)
1910
1910
1911 if opts.get('clean'):
1911 if opts.get(r'clean'):
1912 out = self._gitcommand(['ls-files'])
1912 out = self._gitcommand(['ls-files'])
1913 for f in out.split('\n'):
1913 for f in out.split('\n'):
1914 if not f in changedfiles:
1914 if not f in changedfiles:
@@ -1921,7 +1921,7 b' class gitsubrepo(abstractsubrepo):'
1921 def diff(self, ui, diffopts, node2, match, prefix, **opts):
1921 def diff(self, ui, diffopts, node2, match, prefix, **opts):
1922 node1 = self._state[1]
1922 node1 = self._state[1]
1923 cmd = ['diff', '--no-renames']
1923 cmd = ['diff', '--no-renames']
1924 if opts['stat']:
1924 if opts[r'stat']:
1925 cmd.append('--stat')
1925 cmd.append('--stat')
1926 else:
1926 else:
1927 # for Git, this also implies '-p'
1927 # for Git, this also implies '-p'
@@ -1964,7 +1964,7 b' class gitsubrepo(abstractsubrepo):'
1964 @annotatesubrepoerror
1964 @annotatesubrepoerror
1965 def revert(self, substate, *pats, **opts):
1965 def revert(self, substate, *pats, **opts):
1966 self.ui.status(_('reverting subrepo %s\n') % substate[0])
1966 self.ui.status(_('reverting subrepo %s\n') % substate[0])
1967 if not opts.get('no_backup'):
1967 if not opts.get(r'no_backup'):
1968 status = self.status(None)
1968 status = self.status(None)
1969 names = status.modified
1969 names = status.modified
1970 for name in names:
1970 for name in names:
@@ -1973,7 +1973,7 b' class gitsubrepo(abstractsubrepo):'
1973 (name, bakname))
1973 (name, bakname))
1974 self.wvfs.rename(name, bakname)
1974 self.wvfs.rename(name, bakname)
1975
1975
1976 if not opts.get('dry_run'):
1976 if not opts.get(r'dry_run'):
1977 self.get(substate, overwrite=True)
1977 self.get(substate, overwrite=True)
1978 return []
1978 return []
1979
1979
General Comments 0
You need to be logged in to leave comments. Login now