Patchwork subrepo: add status support for ignored files in git subrepos

login
register
mail settings
Submitter Mathias De Maré
Date Nov. 28, 2014, 7:57 p.m.
Message ID <38f8516fa91a71df42bf.1417204665@mathias-Latitude-E6540>
Download mbox | patch
Permalink /patch/6884/
State Accepted
Headers show

Comments

Mathias De Maré - Nov. 28, 2014, 7:57 p.m.
# HG changeset patch
# User Mathias De Maré <mathias.demare@gmail.com>
# Date 1417202175 -3600
#      Fre Nov 28 20:16:15 2014 +0100
# Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
# Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
subrepo: add status support for ignored files in git subrepos

Retrieving the status of a git subrepo did not show ignored
files. Using 'git ls-files', we can retrieve these files
and display the correct status.
Augie Fackler - Nov. 29, 2014, 3:08 a.m.
On Nov 28, 2014, at 2:57 PM, Mathias De Maré <mathias.demare@gmail.com> wrote:

> # HG changeset patch
> # User Mathias De Maré <mathias.demare@gmail.com>
> # Date 1417202175 -3600
> #      Fre Nov 28 20:16:15 2014 +0100
> # Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
> # Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
> subrepo: add status support for ignored files in git subrepos

Queued, many thanks. Congrats on your first patch to Mercurial!

> 
> Retrieving the status of a git subrepo did not show ignored
> files. Using 'git ls-files', we can retrieve these files
> and display the correct status.
> 
> diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
> --- a/mercurial/subrepo.py
> +++ b/mercurial/subrepo.py
> @@ -1565,16 +1565,25 @@ class gitsubrepo(abstractsubrepo):
>             if status == 'M':
>                 modified.append(f)
>             elif status == 'A':
>                 added.append(f)
>             elif status == 'D':
>                 removed.append(f)
> 
>         deleted, unknown, ignored, clean = [], [], [], []
> +
> +        if not rev2:
> +            command = ['ls-files', '--others', '--exclude-standard']
> +            out = self._gitcommand(command)
> +            for line in out.split('\n'):
> +                if len(line) == 0:
> +                    continue
> +                unknown.append(line)
> +
>         return scmutil.status(modified, added, removed, deleted,
>                               unknown, ignored, clean)
> 
>     def shortid(self, revid):
>         return revid[:7]
> 
> types = {
>     'hg': hgsubrepo,
> diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
> --- a/tests/test-subrepo-git.t
> +++ b/tests/test-subrepo-git.t
> @@ -114,17 +114,20 @@ clone root separately, make different lo
> 
>   $ cd ../t
>   $ hg clone . ../tb 2> /dev/null
>   updating to branch default
>   cloning subrepo s from $TESTTMP/gitroot
>   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> 
>   $ cd ../tb/s
> +  $ hg status --subrepos
>   $ echo f > f
> +  $ hg status --subrepos
> +  ? s/f
>   $ git add f
>   $ cd ..
> 
>   $ hg status --subrepos
>   A s/f
>   $ hg commit --subrepos -m f
>   committing subrepository s
>   $ hg debugsub
> @@ -417,24 +420,27 @@ Check hg update --clean
>   $ cd s
>   $ echo c1 > f1
>   $ echo c1 > f2
>   $ git add f1
>   $ cd ..
>   $ hg status -S
>   M s/g
>   A s/f1
> +  ? s/f2
>   $ ls s
>   f
>   f1
>   f2
>   g
>   $ hg update --clean
>   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
>   $ hg status -S
> +  ? s/f1
> +  ? s/f2
>   $ ls s
>   f
>   f1
>   f2
>   g
> 
> Sticky subrepositories, no changes
>   $ cd $TESTTMP/ta
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
Matt Harbison - Nov. 30, 2014, 4:47 a.m.
On Fri, 28 Nov 2014 20:57:45 +0100, Mathias De Maré wrote:

> # HG changeset patch
> # User Mathias De Maré <mathias.demare@gmail.com>
> # Date 1417202175 -3600
> #      Fre Nov 28 20:16:15 2014 +0100
> # Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
> # Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
> subrepo: add status support for ignored files in git subrepos

Minor nit while this hasn't landed in the main repo- shouldn't this be
'untracked' instead of 'ignored' since the status is reported as '?'
and not 'I'?

> diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
> --- a/tests/test-subrepo-git.t
> +++ b/tests/test-subrepo-git.t
> @@ -114,17 +114,20 @@ clone root separately, make different lo
>  
>    $ cd ../t
>    $ hg clone . ../tb 2> /dev/null
>    updating to branch default
>    cloning subrepo s from $TESTTMP/gitroot
>    3 files updated, 0 files merged, 0 files removed, 0 files unresolved
>  
>    $ cd ../tb/s
> +  $ hg status --subrepos
>    $ echo f > f
> +  $ hg status --subrepos
> +  ? s/f
>    $ git add f
>    $ cd ..
>  
>    $ hg status --subrepos
>    A s/f
>    $ hg commit --subrepos -m f
>    committing subrepository s
>    $ hg debugsub
Mathias De Maré - Dec. 1, 2014, 12:50 p.m.
On Sun, Nov 30, 2014 at 5:47 AM, Matt Harbison <matt_harbison@yahoo.com>
wrote:

> On Fri, 28 Nov 2014 20:57:45 +0100, Mathias De Maré wrote:
>
> > # HG changeset patch
> > # User Mathias De Maré <mathias.demare@gmail.com>
> > # Date 1417202175 -3600
> > #      Fre Nov 28 20:16:15 2014 +0100
> > # Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
> > # Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
> > subrepo: add status support for ignored files in git subrepos
>
> Minor nit while this hasn't landed in the main repo- shouldn't this be
> 'untracked' instead of 'ignored' since the status is reported as '?'
> and not 'I'?
>

Oh, indeed, good point! Is there any chance this could be amended in the
crew repository? I assume this is not something I can still change myself?

(Apologies for the slow response, for some reason all of your mails ended
up in my spam folder.)

>
> > diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
> > --- a/tests/test-subrepo-git.t
> > +++ b/tests/test-subrepo-git.t
> > @@ -114,17 +114,20 @@ clone root separately, make different lo
> >
> >    $ cd ../t
> >    $ hg clone . ../tb 2> /dev/null
> >    updating to branch default
> >    cloning subrepo s from $TESTTMP/gitroot
> >    3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> >
> >    $ cd ../tb/s
> > +  $ hg status --subrepos
> >    $ echo f > f
> > +  $ hg status --subrepos
> > +  ? s/f
> >    $ git add f
> >    $ cd ..
> >
> >    $ hg status --subrepos
> >    A s/f
> >    $ hg commit --subrepos -m f
> >    committing subrepository s
> >    $ hg debugsub
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
Augie Fackler - Dec. 1, 2014, 9:02 p.m.
On Mon, Dec 01, 2014 at 01:50:17PM +0100, Mathias De Maré wrote:
> On Sun, Nov 30, 2014 at 5:47 AM, Matt Harbison <matt_harbison@yahoo.com>
> wrote:
>
> > On Fri, 28 Nov 2014 20:57:45 +0100, Mathias De Maré wrote:
> >
> > > # HG changeset patch
> > > # User Mathias De Maré <mathias.demare@gmail.com>
> > > # Date 1417202175 -3600
> > > #      Fre Nov 28 20:16:15 2014 +0100
> > > # Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
> > > # Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
> > > subrepo: add status support for ignored files in git subrepos
> >
> > Minor nit while this hasn't landed in the main repo- shouldn't this be
> > 'untracked' instead of 'ignored' since the status is reported as '?'
> > and not 'I'?
> >
>
> Oh, indeed, good point! Is there any chance this could be amended in the
> crew repository? I assume this is not something I can still change myself?

Yes, I can amend the version in crew. Feel encouraged to mail me an
updated patch (and CC the list).

>
> (Apologies for the slow response, for some reason all of your mails ended
> up in my spam folder.)
>
> >
> > > diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
> > > --- a/tests/test-subrepo-git.t
> > > +++ b/tests/test-subrepo-git.t
> > > @@ -114,17 +114,20 @@ clone root separately, make different lo
> > >
> > >    $ cd ../t
> > >    $ hg clone . ../tb 2> /dev/null
> > >    updating to branch default
> > >    cloning subrepo s from $TESTTMP/gitroot
> > >    3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> > >
> > >    $ cd ../tb/s
> > > +  $ hg status --subrepos
> > >    $ echo f > f
> > > +  $ hg status --subrepos
> > > +  ? s/f
> > >    $ git add f
> > >    $ cd ..
> > >
> > >    $ hg status --subrepos
> > >    A s/f
> > >    $ hg commit --subrepos -m f
> > >    committing subrepository s
> > >    $ hg debugsub
> >
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@selenic.com
> > http://selenic.com/mailman/listinfo/mercurial-devel
> >

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
Matt Harbison - Dec. 2, 2014, 1:46 a.m.
Mathias De Maré wrote:
>
> On Sun, Nov 30, 2014 at 5:47 AM, Matt Harbison <matt_harbison@yahoo.com
> <mailto:matt_harbison@yahoo.com>> wrote:
>
>     On Fri, 28 Nov 2014 20:57:45 +0100, Mathias De Maré wrote:
>
>     >  # HG changeset patch
>     >  # User Mathias De Maré <mathias.demare@gmail.com
>     <mailto:mathias.demare@gmail.com>>
>     >  # Date 1417202175 -3600
>     >  #      Fre Nov 28 20:16:15 2014 +0100
>     >  # Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
>     >  # Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
>     >  subrepo: add status support for ignored files in git subrepos
>
>     Minor nit while this hasn't landed in the main repo- shouldn't this be
>     'untracked' instead of 'ignored' since the status is reported as '?'
>     and not 'I'?
>
>
> Oh, indeed, good point! Is there any chance this could be amended in the
> crew repository? I assume this is not something I can still change myself?
>
> (Apologies for the slow response, for some reason all of your mails
> ended up in my spam folder.)

Yeah, I'm not sure what the deal is.  My initial post in this thread was 
through the NNTP interface on gmane using Pan on Windows.  I have no 
idea how else to get my reply to go into the proper thread, and I didn't 
realize it was smart enough to trigger an email to the original author. 
  For followup emails (like this), I generally use my local email app, 
and patches are sent with thg.  I'm not sure if you (or Simon) see a 
difference between any of those three.

I know Augie's emails usually land in my spam folder (his second 
response here was the first I remember in a long time that didn't), and 
responses from mpm and Pierre-Yves are about 50/50.  About 7 or 8 weeks 
ago, every one of the -devel digests went into the spam folder too for 
about a month.  Reporting as not spam and adding to the address book 
didn't help.  I finally complained to yahoo support, and the -devel 
digests started making it through about a week later.  I figure it is 
all of the *, -, # and @ characters in patches that make it look spammy, 
but it does seem worse lately.

--Matt
Matt Mackall - Dec. 2, 2014, 10:24 p.m.
On Mon, 2014-12-01 at 20:46 -0500, Matt Harbison wrote:
> Mathias De Maré wrote:
> >
> > On Sun, Nov 30, 2014 at 5:47 AM, Matt Harbison <matt_harbison@yahoo.com
> > <mailto:matt_harbison@yahoo.com>> wrote:
> >
> >     On Fri, 28 Nov 2014 20:57:45 +0100, Mathias De Maré wrote:
> >
> >     >  # HG changeset patch
> >     >  # User Mathias De Maré <mathias.demare@gmail.com
> >     <mailto:mathias.demare@gmail.com>>
> >     >  # Date 1417202175 -3600
> >     >  #      Fre Nov 28 20:16:15 2014 +0100
> >     >  # Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
> >     >  # Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
> >     >  subrepo: add status support for ignored files in git subrepos
> >
> >     Minor nit while this hasn't landed in the main repo- shouldn't this be
> >     'untracked' instead of 'ignored' since the status is reported as '?'
> >     and not 'I'?
> >
> >
> > Oh, indeed, good point! Is there any chance this could be amended in the
> > crew repository? I assume this is not something I can still change myself?
> >
> > (Apologies for the slow response, for some reason all of your mails
> > ended up in my spam folder.)
> 
> Yeah, I'm not sure what the deal is.  My initial post in this thread was 
> through the NNTP interface on gmane using Pan on Windows.  I have no 
> idea how else to get my reply to go into the proper thread, and I didn't 
> realize it was smart enough to trigger an email to the original author. 
>   For followup emails (like this), I generally use my local email app, 
> and patches are sent with thg.  I'm not sure if you (or Simon) see a 
> difference between any of those three.
> 
> I know Augie's emails usually land in my spam folder (his second 
> response here was the first I remember in a long time that didn't), and 
> responses from mpm and Pierre-Yves are about 50/50.  About 7 or 8 weeks 
> ago, every one of the -devel digests went into the spam folder too for 
> about a month.  Reporting as not spam and adding to the address book 
> didn't help.  I finally complained to yahoo support, and the -devel 
> digests started making it through about a week later.  I figure it is 
> all of the *, -, # and @ characters in patches that make it look spammy, 
> but it does seem worse lately.

This is probably because you're using a Yahoo address, and Yahoo decided
to BREAK EVERY EMAIL DISCUSSION LIST IN THE WORLD with an aggressive
change to their DKIM policy about 6 months ago. That causes other
systems to incorrectly detect mail from YOU through the list as spam and
report the list to shared spam databases. Yahoo then uses those
false-positives to mark list mail to you as spam. Also, various people
get automatically bounced off the list for repeated refused delivery
whenever you post a few patches in a row. Such a clusterfuck.

(Since you're about the only Yahoo user on this list, it's only a minor
problem.. but I admin about 40 other lists that are full of yahoos.)

It took a couple months for Mailman to get a fix out and there's still
not a backport to the version of Debian on Selenic. So last week, I
finally decided to bite the bullet and forcibly install one for a newer
version of Debian and manually override the dependencies. Amazingly,
only one thing caught fire.
Angel Ezquerra - Dec. 2, 2014, 10:27 p.m.
On Tue, Dec 2, 2014 at 11:24 PM, Matt Mackall <mpm@selenic.com> wrote:
> On Mon, 2014-12-01 at 20:46 -0500, Matt Harbison wrote:
>> Mathias De Maré wrote:
>> >
>> > On Sun, Nov 30, 2014 at 5:47 AM, Matt Harbison <matt_harbison@yahoo.com
>> > <mailto:matt_harbison@yahoo.com>> wrote:
>> >
>> >     On Fri, 28 Nov 2014 20:57:45 +0100, Mathias De Maré wrote:
>> >
>> >     >  # HG changeset patch
>> >     >  # User Mathias De Maré <mathias.demare@gmail.com
>> >     <mailto:mathias.demare@gmail.com>>
>> >     >  # Date 1417202175 -3600
>> >     >  #      Fre Nov 28 20:16:15 2014 +0100
>> >     >  # Node ID 38f8516fa91a71df42bf2ca5a7e20e54b540f590
>> >     >  # Parent  b913c394386f0a6ebbdcb7e321ff82816d7799fe
>> >     >  subrepo: add status support for ignored files in git subrepos
>> >
>> >     Minor nit while this hasn't landed in the main repo- shouldn't this be
>> >     'untracked' instead of 'ignored' since the status is reported as '?'
>> >     and not 'I'?
>> >
>> >
>> > Oh, indeed, good point! Is there any chance this could be amended in the
>> > crew repository? I assume this is not something I can still change myself?
>> >
>> > (Apologies for the slow response, for some reason all of your mails
>> > ended up in my spam folder.)
>>
>> Yeah, I'm not sure what the deal is.  My initial post in this thread was
>> through the NNTP interface on gmane using Pan on Windows.  I have no
>> idea how else to get my reply to go into the proper thread, and I didn't
>> realize it was smart enough to trigger an email to the original author.
>>   For followup emails (like this), I generally use my local email app,
>> and patches are sent with thg.  I'm not sure if you (or Simon) see a
>> difference between any of those three.
>>
>> I know Augie's emails usually land in my spam folder (his second
>> response here was the first I remember in a long time that didn't), and
>> responses from mpm and Pierre-Yves are about 50/50.  About 7 or 8 weeks
>> ago, every one of the -devel digests went into the spam folder too for
>> about a month.  Reporting as not spam and adding to the address book
>> didn't help.  I finally complained to yahoo support, and the -devel
>> digests started making it through about a week later.  I figure it is
>> all of the *, -, # and @ characters in patches that make it look spammy,
>> but it does seem worse lately.
>
> This is probably because you're using a Yahoo address, and Yahoo decided
> to BREAK EVERY EMAIL DISCUSSION LIST IN THE WORLD with an aggressive
> change to their DKIM policy about 6 months ago. That causes other
> systems to incorrectly detect mail from YOU through the list as spam and
> report the list to shared spam databases. Yahoo then uses those
> false-positives to mark list mail to you as spam. Also, various people
> get automatically bounced off the list for repeated refused delivery
> whenever you post a few patches in a row. Such a clusterfuck.
>
> (Since you're about the only Yahoo user on this list, it's only a minor
> problem.. but I admin about 40 other lists that are full of yahoos.)
>
> It took a couple months for Mailman to get a fix out and there's still
> not a backport to the version of Debian on Selenic. So last week, I
> finally decided to bite the bullet and forcibly install one for a newer
> version of Debian and manually override the dependencies. Amazingly,
> only one thing caught fire.

So this is why most of Matt Harbison's emails end up in my Spam folder
despite my repeated attempts to mark his emails as not spam?!

Angel
Matt Harbison - Dec. 3, 2014, 4:15 a.m.
On Tue, 02 Dec 2014 17:27:44 -0500, Angel Ezquerra  
<angel.ezquerra@gmail.com> wrote:

> On Tue, Dec 2, 2014 at 11:24 PM, Matt Mackall <mpm@selenic.com> wrote:
>
> So this is why most of Matt Harbison's emails end up in my Spam folder
> despite my repeated attempts to mark his emails as not spam?!
>
> Angel

Did you have to do anything special to handle SSL with gmail?  I have this  
configuration, tried sending the last patch with thg 3.1.1 on Windows, and  
got an SSL version error:

abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong  
version number

[email]
method = smtp
 from = Matt Harbison <mharbison72@gmail.com>
cc = matt_harbison@yahoo.com

[smtp]
host = smtp.gmail.com
port = 587
tls = smtps
username = mharbison72


--Matt
Matt Mackall - Dec. 3, 2014, 10:03 p.m.
On Tue, 2014-12-02 at 23:15 -0500, Matt Harbison wrote:
> On Tue, 02 Dec 2014 17:27:44 -0500, Angel Ezquerra  
> <angel.ezquerra@gmail.com> wrote:
> 
> > On Tue, Dec 2, 2014 at 11:24 PM, Matt Mackall <mpm@selenic.com> wrote:
> >
> > So this is why most of Matt Harbison's emails end up in my Spam folder
> > despite my repeated attempts to mark his emails as not spam?!
> >
> > Angel
> 
> Did you have to do anything special to handle SSL with gmail?  I have this  
> configuration, tried sending the last patch with thg 3.1.1 on Windows, and  
> got an SSL version error:
> 
> abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong  
> version number

What OpenSSL version do you have? Google's probably turned off SSLv3
everywhere due to POODLE (as did we), but any vaguely recent OpenSSL
should be happy to use TLS v1.2.

Augie, any ideas?
Augie Fackler - Dec. 3, 2014, 10:08 p.m.
On Dec 3, 2014, at 5:03 PM, Matt Mackall <mpm@selenic.com> wrote:

> On Tue, 2014-12-02 at 23:15 -0500, Matt Harbison wrote:
>> On Tue, 02 Dec 2014 17:27:44 -0500, Angel Ezquerra  
>> <angel.ezquerra@gmail.com> wrote:
>> 
>>> On Tue, Dec 2, 2014 at 11:24 PM, Matt Mackall <mpm@selenic.com> wrote:
>>> 
>>> So this is why most of Matt Harbison's emails end up in my Spam folder
>>> despite my repeated attempts to mark his emails as not spam?!
>>> 
>>> Angel
>> 
>> Did you have to do anything special to handle SSL with gmail?  I have this  
>> configuration, tried sending the last patch with thg 3.1.1 on Windows, and  
>> got an SSL version error:
>> 
>> abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong  
>> version number
> 
> What OpenSSL version do you have? Google's probably turned off SSLv3
> everywhere due to POODLE (as did we), but any vaguely recent OpenSSL
> should be happy to use TLS v1.2.
> 
> Augie, any ideas?

I don't have any ideas immediately. I don't use patchbomb with gmail.

Maybe you're trying SSL, but you should be using STARTTLS over regular smtp?
Matt Harbison - Dec. 4, 2014, 1:04 a.m.
On Wed, 03 Dec 2014 17:03:34 -0500, Matt Mackall <mpm@selenic.com> wrote:

> On Tue, 2014-12-02 at 23:15 -0500, Matt Harbison wrote:
>> On Tue, 02 Dec 2014 17:27:44 -0500, Angel Ezquerra
>> <angel.ezquerra@gmail.com> wrote:
>>
>> > On Tue, Dec 2, 2014 at 11:24 PM, Matt Mackall <mpm@selenic.com> wrote:
>> >
>> > So this is why most of Matt Harbison's emails end up in my Spam folder
>> > despite my repeated attempts to mark his emails as not spam?!
>> >
>> > Angel
>>
>> Did you have to do anything special to handle SSL with gmail?  I have  
>> this
>> configuration, tried sending the last patch with thg 3.1.1 on Windows,  
>> and
>> got an SSL version error:
>>
>> abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong
>> version number
>
> What OpenSSL version do you have? Google's probably turned off SSLv3
> everywhere due to POODLE (as did we), but any vaguely recent OpenSSL
> should be happy to use TLS v1.2.

I don't have OpenSSL installed separately, and it looks like thg ships  
with 0.9.8r, based on the file properties of ssleay32.dll.  It looks like  
1.0.1 is needed for TLS 1.2.

> Augie, any ideas?
>

I'm pretty sure I tried STARTTLS too, but maybe not.  I'll try that next  
time I send.

--Matt
Matt Mackall - Dec. 4, 2014, 1:05 a.m.
On Wed, 2014-12-03 at 17:08 -0500, Augie Fackler wrote:
> On Dec 3, 2014, at 5:03 PM, Matt Mackall <mpm@selenic.com> wrote:
> 
> > On Tue, 2014-12-02 at 23:15 -0500, Matt Harbison wrote:
> >> On Tue, 02 Dec 2014 17:27:44 -0500, Angel Ezquerra  
> >> <angel.ezquerra@gmail.com> wrote:
> >> 
> >>> On Tue, Dec 2, 2014 at 11:24 PM, Matt Mackall <mpm@selenic.com> wrote:
> >>> 
> >>> So this is why most of Matt Harbison's emails end up in my Spam folder
> >>> despite my repeated attempts to mark his emails as not spam?!
> >>> 
> >>> Angel
> >> 
> >> Did you have to do anything special to handle SSL with gmail?  I have this  
> >> configuration, tried sending the last patch with thg 3.1.1 on Windows, and  
> >> got an SSL version error:
> >> 
> >> abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong  
> >> version number
> > 
> > What OpenSSL version do you have? Google's probably turned off SSLv3
> > everywhere due to POODLE (as did we), but any vaguely recent OpenSSL
> > should be happy to use TLS v1.2.
> > 
> > Augie, any ideas?
> 
> I don't have any ideas immediately. I don't use patchbomb with gmail.
> 
> Maybe you're trying SSL, but you should be using STARTTLS over regular smtp?

There are some hints in this thread on how to manually debug it with the
command line openssl tool:

https://groups.google.com/forum/#!topic/git-users/5cQ4I7qRx0I

(though that issue is probably different)
Matt Mackall - Dec. 4, 2014, 2:19 a.m.
On Wed, 2014-12-03 at 20:04 -0500, Matt Harbison wrote:
> On Wed, 03 Dec 2014 17:03:34 -0500, Matt Mackall <mpm@selenic.com> wrote:
> 
> > On Tue, 2014-12-02 at 23:15 -0500, Matt Harbison wrote:
> >> On Tue, 02 Dec 2014 17:27:44 -0500, Angel Ezquerra
> >> <angel.ezquerra@gmail.com> wrote:
> >>
> >> > On Tue, Dec 2, 2014 at 11:24 PM, Matt Mackall <mpm@selenic.com> wrote:
> >> >
> >> > So this is why most of Matt Harbison's emails end up in my Spam folder
> >> > despite my repeated attempts to mark his emails as not spam?!
> >> >
> >> > Angel
> >>
> >> Did you have to do anything special to handle SSL with gmail?  I have  
> >> this
> >> configuration, tried sending the last patch with thg 3.1.1 on Windows,  
> >> and
> >> got an SSL version error:
> >>
> >> abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong
> >> version number
> >
> > What OpenSSL version do you have? Google's probably turned off SSLv3
> > everywhere due to POODLE (as did we), but any vaguely recent OpenSSL
> > should be happy to use TLS v1.2.
> 
> I don't have OpenSSL installed separately, and it looks like thg ships  
> with 0.9.8r, based on the file properties of ssleay32.dll.  It looks like  
> 1.0.1 is needed for TLS 1.2.

Looks like we'll have to nudge one of the THG people..

Steve, SSLv3 and below are rapidly being deprecated around the planet:

http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting-ssl-30.html
https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/
https://groups.google.com/a/chromium.org/forum/#!
topic/security-dev/Vnhy9aKM_l4

...and

http://www.selenic.com/hg/rev/22db405536be

..so you'll probably need to bump the SSL library in THG.
Yuya Nishihara - Dec. 4, 2014, 1:01 p.m.
On Wed, 03 Dec 2014 20:19:42 -0600, Matt Mackall wrote:
> On Wed, 2014-12-03 at 20:04 -0500, Matt Harbison wrote:
> > On Wed, 03 Dec 2014 17:03:34 -0500, Matt Mackall <mpm@selenic.com> wrote:
> > > On Tue, 2014-12-02 at 23:15 -0500, Matt Harbison wrote:
> > >> Did you have to do anything special to handle SSL with gmail?  I have  
> > >> this
> > >> configuration, tried sending the last patch with thg 3.1.1 on Windows,  
> > >> and
> > >> got an SSL version error:
> > >>
> > >> abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong
> > >> version number
> > >
> > > What OpenSSL version do you have? Google's probably turned off SSLv3
> > > everywhere due to POODLE (as did we), but any vaguely recent OpenSSL
> > > should be happy to use TLS v1.2.
> > 
> > I don't have OpenSSL installed separately, and it looks like thg ships  
> > with 0.9.8r, based on the file properties of ssleay32.dll.  It looks like  
> > 1.0.1 is needed for TLS 1.2.
> 
> Looks like we'll have to nudge one of the THG people..
> 
> Steve, SSLv3 and below are rapidly being deprecated around the planet:
> 
> http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting-ssl-30.html
> https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/
> https://groups.google.com/a/chromium.org/forum/#!
> topic/security-dev/Vnhy9aKM_l4
> 
> ...and
> 
> http://www.selenic.com/hg/rev/22db405536be
> 
> ..so you'll probably need to bump the SSL library in THG.

The problem will go away if TortoiseHg is built with Python 2.7.8.  The OpenSSL
dll which Python actually uses is _ssl.pyd.  Python 2.7.8 bundles new version.

https://www.python.org/download/releases/2.7.8/

Regards,
Matt Mackall - Dec. 5, 2014, 1:23 a.m.
On Thu, 2014-12-04 at 22:01 +0900, Yuya Nishihara wrote:
> On Wed, 03 Dec 2014 20:19:42 -0600, Matt Mackall wrote:
> > On Wed, 2014-12-03 at 20:04 -0500, Matt Harbison wrote:
> > > On Wed, 03 Dec 2014 17:03:34 -0500, Matt Mackall <mpm@selenic.com> wrote:
> > > > On Tue, 2014-12-02 at 23:15 -0500, Matt Harbison wrote:
> > > >> Did you have to do anything special to handle SSL with gmail?  I have  
> > > >> this
> > > >> configuration, tried sending the last patch with thg 3.1.1 on Windows,  
> > > >> and
> > > >> got an SSL version error:
> > > >>
> > > >> abort: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong
> > > >> version number
> > > >
> > > > What OpenSSL version do you have? Google's probably turned off SSLv3
> > > > everywhere due to POODLE (as did we), but any vaguely recent OpenSSL
> > > > should be happy to use TLS v1.2.
> > > 
> > > I don't have OpenSSL installed separately, and it looks like thg ships  
> > > with 0.9.8r, based on the file properties of ssleay32.dll.  It looks like  
> > > 1.0.1 is needed for TLS 1.2.
> > 
> > Looks like we'll have to nudge one of the THG people..
> > 
> > Steve, SSLv3 and below are rapidly being deprecated around the planet:
> > 
> > http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting-ssl-30.html
> > https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/
> > https://groups.google.com/a/chromium.org/forum/#!
> > topic/security-dev/Vnhy9aKM_l4
> > 
> > ...and
> > 
> > http://www.selenic.com/hg/rev/22db405536be
> > 
> > ..so you'll probably need to bump the SSL library in THG.
> 
> The problem will go away if TortoiseHg is built with Python 2.7.8.  The OpenSSL
> dll which Python actually uses is _ssl.pyd.  Python 2.7.8 bundles new version.
> 
> https://www.python.org/download/releases/2.7.8/

Does our own change to drop SSLv3 mean that no SSL works with the
current THG?
Yuya Nishihara - Dec. 5, 2014, 12:56 p.m.
On Thu, 04 Dec 2014 19:23:29 -0600, Matt Mackall wrote:
> On Thu, 2014-12-04 at 22:01 +0900, Yuya Nishihara wrote:
> > On Wed, 03 Dec 2014 20:19:42 -0600, Matt Mackall wrote:
> > > Steve, SSLv3 and below are rapidly being deprecated around the planet:
> > > 
> > > http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting-ssl-30.html
> > > https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/
> > > https://groups.google.com/a/chromium.org/forum/#!
> > > topic/security-dev/Vnhy9aKM_l4
> > > 
> > > ...and
> > > 
> > > http://www.selenic.com/hg/rev/22db405536be
> > > 
> > > ..so you'll probably need to bump the SSL library in THG.
> > 
> > The problem will go away if TortoiseHg is built with Python 2.7.8.  The OpenSSL
> > dll which Python actually uses is _ssl.pyd.  Python 2.7.8 bundles new version.
> > 
> > https://www.python.org/download/releases/2.7.8/
> 
> Does our own change to drop SSLv3 mean that no SSL works with the
> current THG?

TLS 1.0 should be supported by OpenSSL 0.9.8y.

It seems the "wrong version number" error was caused by wrong protocol/port.

> [smtp]
> host = smtp.gmail.com
> port = 587
> tls = smtps

It should be "tls = starttls" or "port = 465" (for smtps.)

Regards,
Matt Mackall - Dec. 5, 2014, 6:21 p.m.
On Fri, 2014-12-05 at 21:56 +0900, Yuya Nishihara wrote:
> On Thu, 04 Dec 2014 19:23:29 -0600, Matt Mackall wrote:
> > On Thu, 2014-12-04 at 22:01 +0900, Yuya Nishihara wrote:
> > > On Wed, 03 Dec 2014 20:19:42 -0600, Matt Mackall wrote:
> > > > Steve, SSLv3 and below are rapidly being deprecated around the planet:
> > > > 
> > > > http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting-ssl-30.html
> > > > https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/
> > > > https://groups.google.com/a/chromium.org/forum/#!
> > > > topic/security-dev/Vnhy9aKM_l4
> > > > 
> > > > ...and
> > > > 
> > > > http://www.selenic.com/hg/rev/22db405536be
> > > > 
> > > > ..so you'll probably need to bump the SSL library in THG.
> > > 
> > > The problem will go away if TortoiseHg is built with Python 2.7.8.  The OpenSSL
> > > dll which Python actually uses is _ssl.pyd.  Python 2.7.8 bundles new version.
> > > 
> > > https://www.python.org/download/releases/2.7.8/
> > 
> > Does our own change to drop SSLv3 mean that no SSL works with the
> > current THG?
> 
> TLS 1.0 should be supported by OpenSSL 0.9.8y.
> 
> It seems the "wrong version number" error was caused by wrong protocol/port.
> 
> > [smtp]
> > host = smtp.gmail.com
> > port = 587
> > tls = smtps
> 
> It should be "tls = starttls" or "port = 465" (for smtps.)

Ahh, right!

For most uses, SSL == TLS == "the opaque thing that encrypts sockets at
connect time".

But for SMTP, ("TLS" == "starttls" == "command that switches plaintext
connection on standard port 23 or 587 to encrypted mode") != (SMTPS ==
SMTP over SSL == "SMTP server on port 465 that's always encrypted with
SSL/TLS").
Matt Harbison - Dec. 6, 2014, 4:15 a.m.
On Fri, 05 Dec 2014 07:56:30 -0500, Yuya Nishihara <yuya@tcha.org> wrote:

> On Thu, 04 Dec 2014 19:23:29 -0600, Matt Mackall wrote:
>> On Thu, 2014-12-04 at 22:01 +0900, Yuya Nishihara wrote:
>> > On Wed, 03 Dec 2014 20:19:42 -0600, Matt Mackall wrote:

>>
>> Does our own change to drop SSLv3 mean that no SSL works with the
>> current THG?
>
> TLS 1.0 should be supported by OpenSSL 0.9.8y.
>
> It seems the "wrong version number" error was caused by wrong  
> protocol/port.
>
>> [smtp]
>> host = smtp.gmail.com
>> port = 587
>> tls = smtps
>
> It should be "tls = starttls" or "port = 465" (for smtps.)
>
> Regards,

Yep, this was the problem.  IDK what page I read when setting it up, but I  
could have sworn that it read like "pick either port number", which didn't  
make sense as to why there would be a choice.  Now that I went back to the  
gmail account settings page, I see that there's a nice table of  
configuration instructions...

Anyway, thanks for the help.

--Matt
timeless - Dec. 7, 2014, 7:45 p.m.
Matt Harbison wrote:
> could have sworn that it read like "pick either port number", which didn't
> make sense as to why there would be a choice.  Now that I went back to the
> gmail account settings page, I see that there's a nice table of
> configuration instructions...

I wonder how hard it would be to try the various combinations to see
if there's an SMTP server available (not sending authentication
credentials/a message-- just a handshake) and suggesting the ones (in
some preferential order) that (seem to) work.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1565,16 +1565,25 @@  class gitsubrepo(abstractsubrepo):
             if status == 'M':
                 modified.append(f)
             elif status == 'A':
                 added.append(f)
             elif status == 'D':
                 removed.append(f)
 
         deleted, unknown, ignored, clean = [], [], [], []
+
+        if not rev2:
+            command = ['ls-files', '--others', '--exclude-standard']
+            out = self._gitcommand(command)
+            for line in out.split('\n'):
+                if len(line) == 0:
+                    continue
+                unknown.append(line)
+
         return scmutil.status(modified, added, removed, deleted,
                               unknown, ignored, clean)
 
     def shortid(self, revid):
         return revid[:7]
 
 types = {
     'hg': hgsubrepo,
diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
--- a/tests/test-subrepo-git.t
+++ b/tests/test-subrepo-git.t
@@ -114,17 +114,20 @@  clone root separately, make different lo
 
   $ cd ../t
   $ hg clone . ../tb 2> /dev/null
   updating to branch default
   cloning subrepo s from $TESTTMP/gitroot
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
   $ cd ../tb/s
+  $ hg status --subrepos
   $ echo f > f
+  $ hg status --subrepos
+  ? s/f
   $ git add f
   $ cd ..
 
   $ hg status --subrepos
   A s/f
   $ hg commit --subrepos -m f
   committing subrepository s
   $ hg debugsub
@@ -417,24 +420,27 @@  Check hg update --clean
   $ cd s
   $ echo c1 > f1
   $ echo c1 > f2
   $ git add f1
   $ cd ..
   $ hg status -S
   M s/g
   A s/f1
+  ? s/f2
   $ ls s
   f
   f1
   f2
   g
   $ hg update --clean
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg status -S
+  ? s/f1
+  ? s/f2
   $ ls s
   f
   f1
   f2
   g
 
 Sticky subrepositories, no changes
   $ cd $TESTTMP/ta