Patchwork [4,of,4] subrepo: drop unused pattern initialization in hgsubrepo revert

login
register
mail settings
Submitter Matt Harbison
Date Feb. 15, 2015, 2:12 a.m.
Message ID <97e31954ff352ccbee7f.1423966359@Envy>
Download mbox | patch
Permalink /patch/7802/
State Accepted
Headers show

Comments

Matt Harbison - Feb. 15, 2015, 2:12 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1423375000 18000
#      Sun Feb 08 00:56:40 2015 -0500
# Node ID 97e31954ff352ccbee7fd151c928fc1c781004f1
# Parent  58ae3f3def5115e1d3a9ddad1a849a54ac508015
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.
Augie Fackler - Feb. 19, 2015, 9:16 p.m.
On Sat, Feb 14, 2015 at 09:12:39PM -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1423375000 18000
> #      Sun Feb 08 00:56:40 2015 -0500
> # Node ID 97e31954ff352ccbee7fd151c928fc1c781004f1
> # Parent  58ae3f3def5115e1d3a9ddad1a849a54ac508015
> subrepo: drop unused pattern initialization in hgsubrepo revert

queued these, thanks

>
> 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.
>
> diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
> --- a/mercurial/subrepo.py
> +++ b/mercurial/subrepo.py
> @@ -877,9 +877,6 @@
>              opts['date'] = None
>              opts['rev'] = substate[1]
>
> -            pats = []
> -            if not opts.get('all'):
> -                pats = ['set:modified()']
>              self.filerevert(*pats, **opts)
>
>          # Update the repo to the revision specified in the given substate
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -877,9 +877,6 @@ 
             opts['date'] = None
             opts['rev'] = substate[1]
 
-            pats = []
-            if not opts.get('all'):
-                pats = ['set:modified()']
             self.filerevert(*pats, **opts)
 
         # Update the repo to the revision specified in the given substate