Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.py @ 35168:3da4bd50103d
py3: fix handling of keyword arguments in revert
Differential Revision: https://phab.mercurial-scm.org/D1554
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 29 Nov 2017 07:57:17 +0530 |
parents | 1a314176da9c |
children | ee64e677c3cf |
line wrap: on
line diff
--- a/mercurial/subrepo.py Tue Nov 28 11:00:54 2017 -0500 +++ b/mercurial/subrepo.py Wed Nov 29 07:57:17 2017 +0530 @@ -1089,24 +1089,24 @@ # 2. update the subrepo to the revision specified in # the corresponding substate dictionary self.ui.status(_('reverting subrepo %s\n') % substate[0]) - if not opts.get('no_backup'): + if not opts.get(r'no_backup'): # Revert all files on the subrepo, creating backups # Note that this will not recursively revert subrepos # We could do it if there was a set:subrepos() predicate opts = opts.copy() - opts['date'] = None - opts['rev'] = substate[1] + opts[r'date'] = None + opts[r'rev'] = substate[1] self.filerevert(*pats, **opts) # Update the repo to the revision specified in the given substate - if not opts.get('dry_run'): + if not opts.get(r'dry_run'): self.get(substate, overwrite=True) def filerevert(self, *pats, **opts): - ctx = self._repo[opts['rev']] + ctx = self._repo[opts[r'rev']] parents = self._repo.dirstate.parents() - if opts.get('all'): + if opts.get(r'all'): pats = ['set:modified()'] else: pats = []