Patchwork [4,of,4] test-lfs: cast the flags printed to an int

login
register
mail settings
Submitter Matt Harbison
Date Nov. 15, 2017, 3:18 a.m.
Message ID <e1c6c9631baed04e9bb2.1510715880@Envy>
Download mbox | patch
Permalink /patch/25564/
State Accepted
Headers show

Comments

Matt Harbison - Nov. 15, 2017, 3:18 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1510639788 18000
#      Tue Nov 14 01:09:48 2017 -0500
# Node ID e1c6c9631baed04e9bb29e8da25599ab2590e390
# Parent  6492bdc8a9b8a6304b0fe658d58b5b286043a88f
test-lfs: cast the flags printed to an int

On Windows, the flag values in the subsequent tests were printing with a 'L'
suffix.
Augie Fackler - Nov. 20, 2017, 10:19 p.m.
On Tue, Nov 14, 2017 at 10:18:00PM -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1510639788 18000
> #      Tue Nov 14 01:09:48 2017 -0500
> # Node ID e1c6c9631baed04e9bb29e8da25599ab2590e390
> # Parent  6492bdc8a9b8a6304b0fe658d58b5b286043a88f
> test-lfs: cast the flags printed to an int

queued, thanks

This sounds like the right approach, adn the right time. Let's
coordinate with Facebook and see about ditching those deprecated knobs
posthaste - it'd be a shame to have them live on forever.

We don't need to do it /tomorrow/ but let's definitely get it done
before 4.5 ships. Ideally, let's plan to take the experimental
shrinkwrap off for 4.6 if we don't see any showstoppers between now
and then?
Matt Harbison - Nov. 21, 2017, 7:11 a.m.
On Mon, 20 Nov 2017 17:19:27 -0500, Augie Fackler <raf@durin42.com> wrote:

> On Tue, Nov 14, 2017 at 10:18:00PM -0500, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1510639788 18000
>> #      Tue Nov 14 01:09:48 2017 -0500
>> # Node ID e1c6c9631baed04e9bb29e8da25599ab2590e390
>> # Parent  6492bdc8a9b8a6304b0fe658d58b5b286043a88f
>> test-lfs: cast the flags printed to an int
>
> queued, thanks
>
> This sounds like the right approach, adn the right time. Let's
> coordinate with Facebook and see about ditching those deprecated knobs
> posthaste - it'd be a shame to have them live on forever.
>
> We don't need to do it /tomorrow/ but let's definitely get it done
> before 4.5 ships. Ideally, let's plan to take the experimental
> shrinkwrap off for 4.6 if we don't see any showstoppers between now
> and then?

Sounds like a plan.  I'm hoping that before pulling the shrink wrap off,  
we can teach hgweb to handle the storage protocol, so that lfs.url doesn't  
have to be set by default.  It was a huge hassle making it work with  
another software component.  Some of the code behind these config knobs  
might be useful to that end.  I doubt I'll have that for 4.5, but if  
someone else wants to take a crack at it, that would be great.

I'd also like to get comments on the bullet list of issues mentioned in  
the first patch here.  In addition to that list, I've since noticed that  
strip causes the extension to attempt to upload to the store as part of  
creating the bundle, and it aborts if the file doesn't exist in the local  
store.  That seems wrong for strip, but maybe OK for creating a bundle and  
emailing it to someone?  So I'm not sure what the behavior should be.

Should I file a bunch of bug reports to track these (that seems a bit  
early), or are these random email threads sufficient?
Matt Harbison - Nov. 22, 2017, 2:34 a.m.
On Mon, 20 Nov 2017 17:19:27 -0500, Augie Fackler <raf@durin42.com> wrote:

> On Tue, Nov 14, 2017 at 10:18:00PM -0500, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1510639788 18000
>> #      Tue Nov 14 01:09:48 2017 -0500
>> # Node ID e1c6c9631baed04e9bb29e8da25599ab2590e390
>> # Parent  6492bdc8a9b8a6304b0fe658d58b5b286043a88f
>> test-lfs: cast the flags printed to an int
>
> queued, thanks
>
> This sounds like the right approach, adn the right time. Let's
> coordinate with Facebook and see about ditching those deprecated knobs
> posthaste - it'd be a shame to have them live on forever.
>
> We don't need to do it /tomorrow/ but let's definitely get it done
> before 4.5 ships. Ideally, let's plan to take the experimental
> shrinkwrap off for 4.6 if we don't see any showstoppers between now
> and then?

One thing I forgot to mention is that this only uses changegroup version  
03, which is currently marked experimental.  Depending on why, it may not  
be a good idea to have a non experimental feature rely on experimental  
supporting bits.

Patch

diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -514,7 +514,7 @@ 
   >             continue
   >         sizes = [revlog.revlog.rawsize(fl, i) for i in fl]
   >         texts = [fl.revision(i, raw=True) for i in fl]
-  >         flags = [fl.flags(i) for i in fl]
+  >         flags = [int(fl.flags(i)) for i in fl]
   >         hashes = [hash(t) for t in texts]
   >         print('  %s: rawsizes=%r flags=%r hashes=%r'
   >               % (name, sizes, flags, hashes))