Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.py @ 32206: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 | a77e61b45384 |
children | f4cd4c49e302 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Wed May 03 15:37:51 2017 +0530 +++ b/mercurial/subrepo.py Wed May 03 15:41:28 2017 +0530 @@ -1878,9 +1878,9 @@ deleted, unknown, ignored, clean = [], [], [], [] command = ['status', '--porcelain', '-z'] - if opts.get('unknown'): + if opts.get(r'unknown'): command += ['--untracked-files=all'] - if opts.get('ignored'): + if opts.get(r'ignored'): command += ['--ignored'] out = self._gitcommand(command) @@ -1908,7 +1908,7 @@ elif st == '!!': ignored.append(filename1) - if opts.get('clean'): + if opts.get(r'clean'): out = self._gitcommand(['ls-files']) for f in out.split('\n'): if not f in changedfiles: @@ -1921,7 +1921,7 @@ def diff(self, ui, diffopts, node2, match, prefix, **opts): node1 = self._state[1] cmd = ['diff', '--no-renames'] - if opts['stat']: + if opts[r'stat']: cmd.append('--stat') else: # for Git, this also implies '-p' @@ -1964,7 +1964,7 @@ @annotatesubrepoerror def revert(self, substate, *pats, **opts): self.ui.status(_('reverting subrepo %s\n') % substate[0]) - if not opts.get('no_backup'): + if not opts.get(r'no_backup'): status = self.status(None) names = status.modified for name in names: @@ -1973,7 +1973,7 @@ (name, bakname)) self.wvfs.rename(name, bakname) - if not opts.get('dry_run'): + if not opts.get(r'dry_run'): self.get(substate, overwrite=True) return []