Mercurial > hg > mercurial-source
diff mercurial/subrepo.py @ 18943:27e8dfc2c338
subrepo: fix exception on revert when "all" option is omitted
Since fafdff7e9c43, backout does not set opts['all'], which causes KeyError
at hgsubrepo.revert.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 15 Apr 2013 23:52:57 +0900 |
parents | 798bdb7f1517 |
children | ca480d710fe6 |
line wrap: on
line diff
--- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -764,7 +764,7 @@ opts['rev'] = substate[1] pats = [] - if not opts['all']: + if not opts.get('all'): pats = ['set:modified()'] self.filerevert(ui, *pats, **opts) @@ -774,7 +774,7 @@ def filerevert(self, ui, *pats, **opts): ctx = self._repo[opts['rev']] parents = self._repo.dirstate.parents() - if opts['all']: + if opts.get('all'): pats = ['set:modified()'] else: pats = []