You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/05/17 17:47:37 UTC

svn commit: r1483879 - /subversion/trunk/subversion/svnadmin/svnadmin.c

Author: danielsh
Date: Fri May 17 15:47:37 2013
New Revision: 1483879

URL: http://svn.apache.org/r1483879
Log:
Tweak 'svnadmin info' output for packed FSFS filesystems.

* subversion/svnadmin/svnadmin.c
  (subcommand_info):
    Replace a tristate output field with two binary fields.  This adds
    information (there are four possible outputs, rather than three).  The
    old tristate output was misleading, since it could print "yes" and "no"
    like binary fields do.

New output:
    % svnadmin info 5 | me
    Filesystem Type: fsfs
    Filesystem Format: 6
    FSFS Sharded: yes
    FSFS Shard Size: 4
    FSFS Packed: yes
    FSFS Packable: no

Modified:
    subversion/trunk/subversion/svnadmin/svnadmin.c

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1483879&r1=1483878&r2=1483879&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Fri May 17 15:47:37 2013
@@ -1709,12 +1709,17 @@ subcommand_info(apr_getopt_t *os, void *
           SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shard Size: %d\n"),
                                      fsfs_info->shard_size));
 
-        if (fsfs_info->min_unpacked_rev + fsfs_info->shard_size > youngest + 1)
+        /* "Has 'svnadmin pack' been run?" */
+        if (fsfs_info->min_unpacked_rev)
           SVN_ERR(svn_cmdline_printf(pool, _("FSFS Packed: yes\n")));
-        else if (fsfs_info->min_unpacked_rev)
-          SVN_ERR(svn_cmdline_printf(pool, _("FSFS Packed: partly\n")));
         else
           SVN_ERR(svn_cmdline_printf(pool, _("FSFS Packed: no\n")));
+
+        /* "Would 'svnadmin pack' be a no-op?" */
+        if (fsfs_info->min_unpacked_rev + fsfs_info->shard_size > youngest + 1)
+          SVN_ERR(svn_cmdline_printf(pool, _("FSFS Packable: no\n")));
+        else
+          SVN_ERR(svn_cmdline_printf(pool, _("FSFS Packable: yes\n")));
       }
   }
 



Re: svn commit: r1483879 - /subversion/trunk/subversion/svnadmin/svnadmin.c

Posted by Daniel Shahaf <da...@elego.de>.
Daniel Shahaf wrote on Fri, May 17, 2013 at 17:32:36 +0000:
> On Fri, May 17, 2013 at 06:24:59PM +0100, Philip Martin wrote:
> > Daniel Shahaf <da...@elego.de> writes:
> > 
> > > Johan Corveleyn wrote on Fri, May 17, 2013 at 18:19:10 +0200:
> > >> On Fri, May 17, 2013 at 5:47 PM,  <da...@apache.org> wrote:
> > >> > Author: danielsh
> > >> > Date: Fri May 17 15:47:37 2013
> > >> > New Revision: 1483879
> > >> >
> > >> > URL: http://svn.apache.org/r1483879
> > >> > Log:
> > >> > Tweak 'svnadmin info' output for packed FSFS filesystems.
> > >> >
> > >> > * subversion/svnadmin/svnadmin.c
> > >> >   (subcommand_info):
> > >> >     Replace a tristate output field with two binary fields.  This adds
> > >> >     information (there are four possible outputs, rather than three).  The
> > >> >     old tristate output was misleading, since it could print "yes" and "no"
> > >> >     like binary fields do.
> > >> >
> > >> > New output:
> > >> >     % svnadmin info 5 | me
> > >> >     Filesystem Type: fsfs
> > >> >     Filesystem Format: 6
> > >> >     FSFS Sharded: yes
> > >> >     FSFS Shard Size: 4
> > >> >     FSFS Packed: yes
> > >> >     FSFS Packable: no
> > >> 
> > >> Huh? It's packed but not packable?
> > >
> > > Yes.
> > >
> > > The comments in the code explain the difference.  Suggestions for
> > > a better UI welcome.
> > 
> > FSFS Packed: how many shards are packed
> > FSFS Packable: how many more shards could be packed
> > 
> > So with shard size 4, three shards, and HEAD 22 you get
> > 
> > FSFS Packed: 3
> > FSFS Packable: 2
> 
> You could combine those as:
> 
> FSFS Packed Shards: 3/5

I implemented the above line in r1483953.

> FSFS Packing Enabled: yes

I didn't implement this line.  Perhaps it would be clearer to print
something.  On the other hand, saying nothing is consistent with how we
handle other features (eg, 'svn --version | grep serf'), not to mention
with how svnadmin1.9 will handle new-in-1.10 features.

Re: svn commit: r1483879 - /subversion/trunk/subversion/svnadmin/svnadmin.c

Posted by Daniel Shahaf <da...@apache.org>.
On Fri, May 17, 2013 at 06:24:59PM +0100, Philip Martin wrote:
> Daniel Shahaf <da...@elego.de> writes:
> 
> > Johan Corveleyn wrote on Fri, May 17, 2013 at 18:19:10 +0200:
> >> On Fri, May 17, 2013 at 5:47 PM,  <da...@apache.org> wrote:
> >> > Author: danielsh
> >> > Date: Fri May 17 15:47:37 2013
> >> > New Revision: 1483879
> >> >
> >> > URL: http://svn.apache.org/r1483879
> >> > Log:
> >> > Tweak 'svnadmin info' output for packed FSFS filesystems.
> >> >
> >> > * subversion/svnadmin/svnadmin.c
> >> >   (subcommand_info):
> >> >     Replace a tristate output field with two binary fields.  This adds
> >> >     information (there are four possible outputs, rather than three).  The
> >> >     old tristate output was misleading, since it could print "yes" and "no"
> >> >     like binary fields do.
> >> >
> >> > New output:
> >> >     % svnadmin info 5 | me
> >> >     Filesystem Type: fsfs
> >> >     Filesystem Format: 6
> >> >     FSFS Sharded: yes
> >> >     FSFS Shard Size: 4
> >> >     FSFS Packed: yes
> >> >     FSFS Packable: no
> >> 
> >> Huh? It's packed but not packable?
> >
> > Yes.
> >
> > The comments in the code explain the difference.  Suggestions for
> > a better UI welcome.
> 
> FSFS Packed: how many shards are packed
> FSFS Packable: how many more shards could be packed
> 
> So with shard size 4, three shards, and HEAD 22 you get
> 
> FSFS Packed: 3
> FSFS Packable: 2

You could combine those as:

FSFS Packed Shards: 3/5
FSFS Packing Enabled: yes


Re: svn commit: r1483879 - /subversion/trunk/subversion/svnadmin/svnadmin.c

Posted by Philip Martin <ph...@wandisco.com>.
Daniel Shahaf <da...@elego.de> writes:

> Johan Corveleyn wrote on Fri, May 17, 2013 at 18:19:10 +0200:
>> On Fri, May 17, 2013 at 5:47 PM,  <da...@apache.org> wrote:
>> > Author: danielsh
>> > Date: Fri May 17 15:47:37 2013
>> > New Revision: 1483879
>> >
>> > URL: http://svn.apache.org/r1483879
>> > Log:
>> > Tweak 'svnadmin info' output for packed FSFS filesystems.
>> >
>> > * subversion/svnadmin/svnadmin.c
>> >   (subcommand_info):
>> >     Replace a tristate output field with two binary fields.  This adds
>> >     information (there are four possible outputs, rather than three).  The
>> >     old tristate output was misleading, since it could print "yes" and "no"
>> >     like binary fields do.
>> >
>> > New output:
>> >     % svnadmin info 5 | me
>> >     Filesystem Type: fsfs
>> >     Filesystem Format: 6
>> >     FSFS Sharded: yes
>> >     FSFS Shard Size: 4
>> >     FSFS Packed: yes
>> >     FSFS Packable: no
>> 
>> Huh? It's packed but not packable?
>
> Yes.
>
> The comments in the code explain the difference.  Suggestions for
> a better UI welcome.

FSFS Packed: how many shards are packed
FSFS Packable: how many more shards could be packed

So with shard size 4, three shards, and HEAD 22 you get

FSFS Packed: 3
FSFS Packable: 2

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: svn commit: r1483879 - /subversion/trunk/subversion/svnadmin/svnadmin.c

Posted by Ben Reser <be...@reser.org>.
On Fri, May 17, 2013 at 9:55 AM, Daniel Shahaf <da...@elego.de> wrote:
> The comments in the code explain the difference.  Suggestions for
> a better UI welcome.

How about "FSFS Packing Enabled" and "FSFS Fully Packed"

Re: svn commit: r1483879 - /subversion/trunk/subversion/svnadmin/svnadmin.c

Posted by Daniel Shahaf <da...@elego.de>.
Johan Corveleyn wrote on Fri, May 17, 2013 at 18:19:10 +0200:
> On Fri, May 17, 2013 at 5:47 PM,  <da...@apache.org> wrote:
> > Author: danielsh
> > Date: Fri May 17 15:47:37 2013
> > New Revision: 1483879
> >
> > URL: http://svn.apache.org/r1483879
> > Log:
> > Tweak 'svnadmin info' output for packed FSFS filesystems.
> >
> > * subversion/svnadmin/svnadmin.c
> >   (subcommand_info):
> >     Replace a tristate output field with two binary fields.  This adds
> >     information (there are four possible outputs, rather than three).  The
> >     old tristate output was misleading, since it could print "yes" and "no"
> >     like binary fields do.
> >
> > New output:
> >     % svnadmin info 5 | me
> >     Filesystem Type: fsfs
> >     Filesystem Format: 6
> >     FSFS Sharded: yes
> >     FSFS Shard Size: 4
> >     FSFS Packed: yes
> >     FSFS Packable: no
> 
> Huh? It's packed but not packable?

Yes.

The comments in the code explain the difference.  Suggestions for
a better UI welcome.

> Like in: "it's tested but not testable" :-) ?

No, like "it's discovered and not discoverable".

Re: svn commit: r1483879 - /subversion/trunk/subversion/svnadmin/svnadmin.c

Posted by Johan Corveleyn <jc...@gmail.com>.
On Fri, May 17, 2013 at 5:47 PM,  <da...@apache.org> wrote:
> Author: danielsh
> Date: Fri May 17 15:47:37 2013
> New Revision: 1483879
>
> URL: http://svn.apache.org/r1483879
> Log:
> Tweak 'svnadmin info' output for packed FSFS filesystems.
>
> * subversion/svnadmin/svnadmin.c
>   (subcommand_info):
>     Replace a tristate output field with two binary fields.  This adds
>     information (there are four possible outputs, rather than three).  The
>     old tristate output was misleading, since it could print "yes" and "no"
>     like binary fields do.
>
> New output:
>     % svnadmin info 5 | me
>     Filesystem Type: fsfs
>     Filesystem Format: 6
>     FSFS Sharded: yes
>     FSFS Shard Size: 4
>     FSFS Packed: yes
>     FSFS Packable: no

Huh? It's packed but not packable? Like in: "it's tested but not testable" :-) ?

--
Johan