comparison mercurial/subrepo.py @ 24135:27b6d41aa029

subrepo: drop unused pattern initialization in hgsubrepo revert This passed an empty list to filerevert() if '--all' was specified, otherwise the set of modified files. But then filerevert() immediately switched this and reinitialized 'pats' to an empty list if '--all' was *not* specified.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 08 Feb 2015 00:56:40 -0500
parents afed5d2e7985
children 7a2194473155
comparison
equal deleted inserted replaced
24134:afed5d2e7985 24135:27b6d41aa029
876 # We could do it if there was a set:subrepos() predicate 876 # We could do it if there was a set:subrepos() predicate
877 opts = opts.copy() 877 opts = opts.copy()
878 opts['date'] = None 878 opts['date'] = None
879 opts['rev'] = substate[1] 879 opts['rev'] = substate[1]
880 880
881 pats = []
882 if not opts.get('all'):
883 pats = ['set:modified()']
884 self.filerevert(*pats, **opts) 881 self.filerevert(*pats, **opts)
885 882
886 # Update the repo to the revision specified in the given substate 883 # Update the repo to the revision specified in the given substate
887 if not opts.get('dry_run'): 884 if not opts.get('dry_run'):
888 self.get(substate, overwrite=True) 885 self.get(substate, overwrite=True)