Patchwork [3,of,3] subrepo: only fetch unknown files from git when explicitly requested

login
register
mail settings
Submitter Matt Harbison
Date March 4, 2015, 2:44 a.m.
Message ID <6bccd250e9fe61e665f2.1425437082@Envy>
Download mbox | patch
Permalink /patch/7894/
State Accepted
Headers show

Comments

Matt Harbison - March 4, 2015, 2:44 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1425436276 18000
#      Tue Mar 03 21:31:16 2015 -0500
# Node ID 6bccd250e9fe61e665f20ed7b449ff06f5f4e3d3
# Parent  d9d38d9d0be0c2ccd16e85ae7b42dcb52697648b
subrepo: only fetch unknown files from git when explicitly requested
Mathias De Maré - March 4, 2015, 5:01 p.m.
On Wed, Mar 4, 2015 at 3:44 AM, Matt Harbison <mharbison72@gmail.com> wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1425436276 18000
> #      Tue Mar 03 21:31:16 2015 -0500
> # Node ID 6bccd250e9fe61e665f20ed7b449ff06f5f4e3d3
> # Parent  d9d38d9d0be0c2ccd16e85ae7b42dcb52697648b
> subrepo: only fetch unknown files from git when explicitly requested
>
These all look good to me, nice cleanups.

Greetings,
Mathias

>
> diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
> --- a/mercurial/subrepo.py
> +++ b/mercurial/subrepo.py
> @@ -1662,7 +1662,7 @@
>
>          deleted, unknown, ignored, clean = [], [], [], []
>
> -        if not rev2:
> +        if opts.get('unknown'):
>              command = ['ls-files', '--others', '--exclude-standard']
>              out = self._gitcommand(command)
>              for line in out.split('\n'):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
Pierre-Yves David - March 4, 2015, 11:24 p.m.
On 03/04/2015 09:01 AM, Mathias De Maré wrote:
>
>
> On Wed, Mar 4, 2015 at 3:44 AM, Matt Harbison <mharbison72@gmail.com
> <mailto:mharbison72@gmail.com>> wrote:
>
>     # HG changeset patch
>     # User Matt Harbison <matt_harbison@yahoo.com
>     <mailto:matt_harbison@yahoo.com>>
>     # Date 1425436276 18000
>     #      Tue Mar 03 21:31:16 2015 -0500
>     # Node ID 6bccd250e9fe61e665f20ed7b449ff06f5f4e3d3
>     # Parent  d9d38d9d0be0c2ccd16e85ae7b42dcb52697648b
>     subrepo: only fetch unknown files from git when explicitly requested
>
> These all look good to me, nice cleanups.

And these are pushed to the clowncopter. Thanks for the pre-review, feel 
free to CC some relevant people when doing so.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1662,7 +1662,7 @@ 
 
         deleted, unknown, ignored, clean = [], [], [], []
 
-        if not rev2:
+        if opts.get('unknown'):
             command = ['ls-files', '--others', '--exclude-standard']
             out = self._gitcommand(command)
             for line in out.split('\n'):