You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2002/07/26 22:48:50 UTC

I like the new output of 'ls'

I like the output of 'svn ls' now, oh yes I do.  Nice job, Garrett.

Notice the distinct similarity to 'ls -l':

$ svn ls http://svn.collab.net/repos/logos
http://svn.collab.net/repos/logos:
_      25 anonymou     2807 Jul 25 19:07 README.html
_      42 anonymou     1803 Jul 26 11:07 VOTES
_      42 anonymou     5040 Jul 26 11:07 entries.html
_      42 anonymou        0 Jul 26 11:07 images/
_      29 anonymou        0 Jul 26 00:07 src/

$ ls -l logos
total 24
-rw-r--r--  1 sussman  users  2807 Jul 26 09:13 README.html
-rw-r--r--  1 sussman  users  1803 Jul 26 12:04 VOTES
-rw-r--r--  1 sussman  users  5040 Jul 26 12:04 entries.html
drwxr-xr-x  3 sussman  users  1024 Jul 26 16:04 images/
drwxr-xr-x  3 sussman  users   512 Jul 26 09:13 src/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by "Glenn A. Thompson" <gt...@cdr.net>.
> >
>
> Right. Or even letting them put in a format string, for apr_strftime.
>

I like this.

gat


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Branko Čibej <br...@xbc.nu>.
Ben Collins-Sussman wrote:

>Branko Čibej <br...@xbc.nu> writes:
>
>  
>
>>I'm very close to -1 here. I suggest some effort should be made to
>>make the h-r date format customizable in ~/.subversion/options, and
>>perhaps with a --date-format flag (for output parsers). Then have "svn
>>ls" just use svn_time_to_human_nts(), or whatever the function is.
>>    
>>
>
>That function was producing absurdly long dates:
>

Yes, I know.

>$ svn ls http://svn.collab.net/repos/svn  
>http://svn.collab.net/repos/svn:
>2738 bmatzelle 0 0 2002-07-26 12:54:46 -0500 (Fri, 26 Jul 2002) clients/
>2739 sussman 0 0 2002-07-26 15:23:17 -0500 (Fri, 26 Jul 2002) trunk/
>2703 brane 0 0 2002-07-24 21:57:56 -0500 (Wed, 24 Jul 2002) branches/
>2734 kfogel 0 2331 2002-07-26 09:19:14 -0500 (Fri, 26 Jul 2002) COMMITTERS
>2698 rooneg 0 0 2002-07-24 17:32:28 -0500 (Wed, 24 Jul 2002) tags/
>
>So I think, yah, we need a bunch of different human-readable date
>formats, and we can let folks choose their favorite in ~/.subversion/.
>

Right. Or even letting them put in a format string, for apr_strftime.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Ben Collins-Sussman <su...@collab.net>.
Branko Čibej <br...@xbc.nu> writes:

> I'm very close to -1 here. I suggest some effort should be made to
> make the h-r date format customizable in ~/.subversion/options, and
> perhaps with a --date-format flag (for output parsers). Then have "svn
> ls" just use svn_time_to_human_nts(), or whatever the function is.

That function was producing absurdly long dates:

$ svn ls http://svn.collab.net/repos/svn  
http://svn.collab.net/repos/svn:
2738 bmatzelle 0 0 2002-07-26 12:54:46 -0500 (Fri, 26 Jul 2002) clients/
2739 sussman 0 0 2002-07-26 15:23:17 -0500 (Fri, 26 Jul 2002) trunk/
2703 brane 0 0 2002-07-24 21:57:56 -0500 (Wed, 24 Jul 2002) branches/
2734 kfogel 0 2331 2002-07-26 09:19:14 -0500 (Fri, 26 Jul 2002) COMMITTERS
2698 rooneg 0 0 2002-07-24 17:32:28 -0500 (Wed, 24 Jul 2002) tags/

So I think, yah, we need a bunch of different human-readable date
formats, and we can let folks choose their favorite in ~/.subversion/.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Short date format (Was: Re: I like the new output of 'ls')

Posted by Nuutti Kotivuori <na...@iki.fi>.
Garrett Rooney wrote:
> On Fri, Jul 26, 2002 at 09:30:06PM -0500, Karl Fogel wrote:
>> Garrett Rooney <ro...@electricjellyfish.net> writes:
>>> i believe that Nuutti Kotivuori was planning on making the date
>>> format configurable in the future (at least the comments in
>>> libsvn_subr/time.c seem to give that impression), so i'd say that
>>> when that is done we should just add two options, one for long
>>> and one for short.

Actually, I was not. I was planning on letting somebody do the
configuration file support and decide on the ways how random places of
code can easily access those variables - and then nudging him in the
direction of "Hey, there's a variable you can easily use."

>> That is to say:
>> 
>> One format string that Subversion uses when it thinks it's printing
>> a short date, and another format string that it uses when it thinks
>> it's printing a long date, and we just set reasonable defaults for
>> both of them?  In other words, a particularly obtuse human could
>> set the "short" format string such that it results in a longer date
>> string than the long format, if they really wanted to.
>> 
>> (I think that's what you meant, just want to make sure.)
> 
> yes, that's what i meant.  they could set whatever kind of format
> string they want, but if they pick something really long for the
> short one then it'll probably get truncated all over the place.

One very important distinction _must_ be made here. The output of
svn_time_to_human_nts is (regardless of the name of the function)
machine-parseable. It does contain a strict beginning string that
should not be allowed to be customizable, that will always stay
machine parseable. The latter part of the format can be customized as
wished ofcourse.

Now, the format of svn_time_to_short_human_nts, that cannot very well
be machine parseable, since there isn't just enough room for a static
part. So that has to be user configurable and respecting locales -
just like 'ls' is. This is a function that is not just a cool
addition, but a function that is really needed.

And the customizable formats of these functions (or only the latter
part in the long format) should be separate - since on the log
messages, one may want to have only the weekday (Wednesday) after the
format, where as the short format may be something entirely different.

And if we think about machine-parseability, the verbose format of 'svn
ls' really doesn't need to be machine-parseable. If it's a machine, it
wants to do a non-verbose ls to get the file names - and then work on
those. And a '--xml' switch can ofcourse be added later if someone
wants it.

So, in short:

Let's make svn_time_to_short_human_nts! Let's make the latter part of
the long format and the short format customizable by users! Let's make
'svn ls -v' just as clipping and user defined we want - and let's make
'svn ls' to have a machine-parseable output!

Yay, life is good!

-- Naked

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Fri, Jul 26, 2002 at 09:30:06PM -0500, Karl Fogel wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
> > i believe that Nuutti Kotivuori was planning on making the date format
> > configurable in the future (at least the comments in
> > libsvn_subr/time.c seem to give that impression), so i'd say that when
> > that is done we should just add two options, one for long and one for
> > short.
> 
> That is to say:
> 
> One format string that Subversion uses when it thinks it's printing a
> short date, and another format string that it uses when it thinks it's
> printing a long date, and we just set reasonable defaults for both of
> them?  In other words, a particularly obtuse human could set the
> "short" format string such that it results in a longer date string
> than the long format, if they really wanted to.
> 
> (I think that's what you meant, just want to make sure.)

yes, that's what i meant.  they could set whatever kind of format
string they want, but if they pick something really long for the short
one then it'll probably get truncated all over the place.

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> i believe that Nuutti Kotivuori was planning on making the date format
> configurable in the future (at least the comments in
> libsvn_subr/time.c seem to give that impression), so i'd say that when
> that is done we should just add two options, one for long and one for
> short.

That is to say:

One format string that Subversion uses when it thinks it's printing a
short date, and another format string that it uses when it thinks it's
printing a long date, and we just set reasonable defaults for both of
them?  In other words, a particularly obtuse human could set the
"short" format string such that it results in a longer date string
than the long format, if they really wanted to.

(I think that's what you meant, just want to make sure.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sat, Jul 27, 2002 at 04:18:24AM +0200, Branko _ibej wrote:

> Yes, that's why this is an auspicious time for adding date format 
> customization.

well, here's a patch to add a 'svn_time_to_short_human_nts ()'
function, to go along with our existing 'svn_time_to_human_nts ()'.

i believe that Nuutti Kotivuori was planning on making the date format
configurable in the future (at least the comments in
libsvn_subr/time.c seem to give that impression), so i'd say that when
that is done we should just add two options, one for long and one for
short.

-garrett

Index: ./subversion/include/svn_time.h
===================================================================
--- ./subversion/include/svn_time.h
+++ ./subversion/include/svn_time.h	Fri Jul 26 22:13:21 2002
@@ -43,6 +43,10 @@
    suitable for human display. */
 const char *svn_time_to_human_nts (apr_time_t when, apr_pool_t *pool);
 
+/* Convert WHEN to a const char * representation allocated in POOL,
+   suitable for human display and shorter than that produced by 
+   svn_time_to_human_nts (). */
+const char *svn_time_to_short_human_nts (apr_time_t when, apr_pool_t *pool);
 
 /* Needed by getdate.y parser */
 struct getdate_time {
Index: ./subversion/libsvn_subr/time.c
===================================================================
--- ./subversion/libsvn_subr/time.c
+++ ./subversion/libsvn_subr/time.c	Fri Jul 26 22:20:49 2002
@@ -77,6 +77,11 @@
 static const char * const human_timestamp_format_suffix =
 " (%a, %d %b %Y)";
 
+/* for situations when the long format is too long, we provide a shorter 
+   version. */
+#define SVN_TIME__MAX_SHORT_LENGTH SVN_TIME__MAX_LENGTH / 5
+
+static const char * const short_human_timestamp_format = "%b %d %H:%m";
 
 const char *
 svn_time_to_nts (apr_time_t t, apr_pool_t *pool)
@@ -261,6 +266,27 @@
   /* If there was an error, ensure that the string is zero-terminated. */
   if (!ret || retlen == 0)
     curptr = '\0';
+
+  return datestr;
+}
+
+
+const char *
+svn_time_to_short_human_nts (apr_time_t t, apr_pool_t *pool)
+{
+  apr_time_exp_t exploded_time;
+  apr_status_t apr_err;
+  apr_size_t size;
+
+  char *datestr = apr_palloc(pool, SVN_TIME__MAX_SHORT_LENGTH);
+
+  apr_time_exp_lt (&exploded_time, t);
+
+  apr_err = apr_strftime (datestr, &size, SVN_TIME__MAX_SHORT_LENGTH,
+                          short_human_timestamp_format, &exploded_time);
+  /* if that failed, just null terminate the string. */
+  if (apr_err)
+    datestr[0] = '\0';
 
   return datestr;
 }
Index: ./subversion/clients/cmdline/ls-cmd.c
===================================================================
--- ./subversion/clients/cmdline/ls-cmd.c
+++ ./subversion/clients/cmdline/ls-cmd.c	Fri Jul 26 22:16:50 2002
@@ -59,7 +59,6 @@
       const char *native_author;
       svn_dirent_t *dirent;
       svn_item_t *item;
-      char timestr[20];
      
       item = &APR_ARRAY_IDX (array, i, svn_item_t);
 
@@ -72,29 +71,12 @@
       SVN_ERR (svn_utf_cstring_from_utf8 (&native_author,
                                           dirent->last_author, pool));
 
-      {
-        /* svn_time_to_human_nts gives us something *way* to long to use for 
-           this, so we have to roll our own. */
-        apr_time_exp_t exp_time;
-        apr_status_t apr_err;
-        apr_size_t size;
-
-        apr_time_exp_lt (&exp_time, dirent->time);
-
-        apr_err = apr_strftime (timestr, &size, sizeof (timestr), "%b %d %H:%m",
-                                &exp_time);
-
-        /* if that failed, just zero out the string and print nothing */
-        if (apr_err)
-          timestr[0] = '\0';
-      }
-
       printf ("%c %7"SVN_REVNUM_T_FMT" %8.8s %8ld %12s %s%s\n", 
               dirent->has_props ? 'P' : '_',
               dirent->created_rev,
               native_author ? native_author : "      ? ",
               (long int) dirent->size,
-              timestr,
+              svn_time_to_short_human_nts (dirent->time, pool),
               native_entryname,
               (dirent->kind == svn_node_dir) ? "/" : "");
     }

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sat, Jul 27, 2002 at 04:18:24AM +0200, Branko _ibej wrote:

> Yes, that's why this is an auspicious time for adding date format 
> customization.

ok, here's a new version of the previous patch, with the added ability
to specify some format strings in ~/.subversion/formats for use as the
suffix of the long time format and the entire short time format.

a few things i don't like about this patch as it stands:

we're just ignoring errors that might occur if we can't read the
configuration files, since the time conversion functions don't return
svn_error_t's we can't currently propogate the error up the stack.  i
don't know if we really care about this enough to change them, but if
we do i can do it.  it'll be a mechanical change and shouldn't be too
hard.

there's no win32 stuff done, someone with some windows savy has to
write the parts of the code that hit the registry.

i'm not thrilled about reading in a config file for this kind of
thing, but i also don't like the idea of caching it in a static
variable (what if it's a long running app and the user changes the
config...), and i also don't like the idea of reading this in once and
passing it all over the place, so i suppose this is the best we can
do.

input is welcome as always.

-garrett 

Index: ./subversion/include/svn_config.h
===================================================================
--- ./subversion/include/svn_config.h
+++ ./subversion/include/svn_config.h	Fri Jul 26 23:47:08 2002
@@ -67,6 +67,8 @@
 */
 svn_error_t *svn_config_read_proxies (svn_config_t **cfgp, apr_pool_t *pool);
 
+/* Read in the configuration information for user defined format strings. */
+svn_error_t *svn_config_read_formats (svn_config_t **cfgp, apr_pool_t *pool);
 
 /* Read configuration data from FILE (a file or registry path) into
    *CFGP, allocated in POOL.
Index: ./subversion/include/svn_time.h
===================================================================
--- ./subversion/include/svn_time.h
+++ ./subversion/include/svn_time.h	Fri Jul 26 22:13:21 2002
@@ -43,6 +43,10 @@
    suitable for human display. */
 const char *svn_time_to_human_nts (apr_time_t when, apr_pool_t *pool);
 
+/* Convert WHEN to a const char * representation allocated in POOL,
+   suitable for human display and shorter than that produced by 
+   svn_time_to_human_nts (). */
+const char *svn_time_to_short_human_nts (apr_time_t when, apr_pool_t *pool);
 
 /* Needed by getdate.y parser */
 struct getdate_time {
Index: ./subversion/libsvn_subr/time.c
===================================================================
--- ./subversion/libsvn_subr/time.c
+++ ./subversion/libsvn_subr/time.c	Sat Jul 27 00:05:20 2002
@@ -23,6 +23,7 @@
 #include <apr_time.h>
 #include <apr_strings.h>
 #include "svn_time.h"
+#include "svn_config.h"
 
 
 
@@ -77,6 +78,11 @@
 static const char * const human_timestamp_format_suffix =
 " (%a, %d %b %Y)";
 
+/* for situations when the long format is too long, we provide a shorter 
+   version. */
+#define SVN_TIME__MAX_SHORT_LENGTH SVN_TIME__MAX_LENGTH / 5
+
+static const char * const short_human_timestamp_format = "%b %d %H:%m";
 
 const char *
 svn_time_to_nts (apr_time_t t, apr_pool_t *pool)
@@ -251,16 +257,71 @@
   /* Calculate offset to the end of the machine parseable part. */
   curptr = datestr + len;
 
-  /* Put in human explanatory part */
-  ret = apr_strftime (curptr,
-                      &retlen,
-                      SVN_TIME__MAX_LENGTH - len,
-                      human_timestamp_format_suffix,
-                      &exploded_time);
-  
+  {
+    const char *timestamp_format_suffix;
+    svn_config_t *cfg;
+    svn_error_t *err;
+
+    err = svn_config_read_formats (&cfg, pool);
+    if (! err)
+      {
+        svn_config_get (cfg, &timestamp_format_suffix, "time", 
+                        "long_format_suffix", human_timestamp_format_suffix);
+      }
+    else
+      {
+        timestamp_format_suffix = human_timestamp_format_suffix;
+      }
+
+    /* Put in human explanatory part */
+    ret = apr_strftime (curptr,
+                        &retlen,
+                        SVN_TIME__MAX_LENGTH - len,
+                        timestamp_format_suffix,
+                        &exploded_time);
+  }
+
   /* If there was an error, ensure that the string is zero-terminated. */
   if (!ret || retlen == 0)
     curptr = '\0';
+
+  return datestr;
+}
+
+
+const char *
+svn_time_to_short_human_nts (apr_time_t t, apr_pool_t *pool)
+{
+  apr_time_exp_t exploded_time;
+  apr_status_t apr_err;
+  apr_size_t size;
+
+  char *datestr = apr_palloc(pool, SVN_TIME__MAX_SHORT_LENGTH);
+
+  apr_time_exp_lt (&exploded_time, t);
+
+  {
+    const char *short_timestamp_format;
+    svn_config_t *cfg;
+    svn_error_t *err;
+
+    err = svn_config_read_formats (&cfg, pool);
+    if (! err)
+      {
+        svn_config_get (cfg, &short_timestamp_format, "time", 
+                        "short_format", short_human_timestamp_format);
+      }
+    else
+      {
+        short_timestamp_format = short_human_timestamp_format;
+      }
+
+    apr_err = apr_strftime (datestr, &size, SVN_TIME__MAX_SHORT_LENGTH,
+                            short_timestamp_format, &exploded_time);
+    /* if that failed, just null terminate the string. */
+    if (apr_err)
+      datestr[0] = '\0';
+  }
 
   return datestr;
 }
Index: ./subversion/libsvn_subr/config.c
===================================================================
--- ./subversion/libsvn_subr/config.c
+++ ./subversion/libsvn_subr/config.c	Fri Jul 26 23:50:29 2002
@@ -212,6 +212,30 @@
 }
 
 
+svn_error_t *
+svn_config_read_formats (svn_config_t **cfgp, apr_pool_t *pool)
+{
+  const char *usr_cfg_path, *sys_cfg_path;
+  const char *usr_reg_path, *sys_reg_path;
+
+  /* XXX need win32 impl */
+
+  SVN_ERR (svn_config__sys_config_path (&sys_cfg_path,
+                                        SVN_CONFIG__USR_FORMATS_FILE,
+                                        pool));
+
+  SVN_ERR (svn_config__user_config_path (&usr_cfg_path,
+                                         SVN_CONFIG__USR_FORMATS_FILE,
+                                         pool));
+
+  SVN_ERR (read_all (cfgp,
+                     sys_reg_path, usr_reg_path,
+                     sys_cfg_path, usr_cfg_path,
+                     pool));
+
+  return SVN_NO_ERROR;
+}
+
 
 /* Iterate through CFG, passing BATON to CALLBACK for every (SECTION, OPTION)
    pair.  Stop if CALLBACK returns TRUE.  Allocate from POOL. */
Index: ./subversion/libsvn_subr/config_impl.h
===================================================================
--- ./subversion/libsvn_subr/config_impl.h
+++ ./subversion/libsvn_subr/config_impl.h	Fri Jul 26 23:45:27 2002
@@ -112,6 +112,8 @@
 /* The proxy config file in SVN_CONFIG__DIRECTORY. */
 #define SVN_CONFIG__USR_PROXY_FILE    "proxies"
 
+/* The formats config file in SVN_CONFIG__DIRECTORY. */
+#define SVN_CONFIG__USR_FORMATS_FILE  "formats"
 
 /* Set *PATH_P to the path to config file FNAME in the system
    configuration area, allocated in POOL.  If FNAME is NULL, set
Index: ./subversion/clients/cmdline/ls-cmd.c
===================================================================
--- ./subversion/clients/cmdline/ls-cmd.c
+++ ./subversion/clients/cmdline/ls-cmd.c	Fri Jul 26 22:16:50 2002
@@ -59,7 +59,6 @@
       const char *native_author;
       svn_dirent_t *dirent;
       svn_item_t *item;
-      char timestr[20];
      
       item = &APR_ARRAY_IDX (array, i, svn_item_t);
 
@@ -72,29 +71,12 @@
       SVN_ERR (svn_utf_cstring_from_utf8 (&native_author,
                                           dirent->last_author, pool));
 
-      {
-        /* svn_time_to_human_nts gives us something *way* to long to use for 
-           this, so we have to roll our own. */
-        apr_time_exp_t exp_time;
-        apr_status_t apr_err;
-        apr_size_t size;
-
-        apr_time_exp_lt (&exp_time, dirent->time);
-
-        apr_err = apr_strftime (timestr, &size, sizeof (timestr), "%b %d %H:%m",
-                                &exp_time);
-
-        /* if that failed, just zero out the string and print nothing */
-        if (apr_err)
-          timestr[0] = '\0';
-      }
-
       printf ("%c %7"SVN_REVNUM_T_FMT" %8.8s %8ld %12s %s%s\n", 
               dirent->has_props ? 'P' : '_',
               dirent->created_rev,
               native_author ? native_author : "      ? ",
               (long int) dirent->size,
-              timestr,
+              svn_time_to_short_human_nts (dirent->time, pool),
               native_entryname,
               (dirent->kind == svn_node_dir) ? "/" : "");
     }

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Branko Čibej <br...@xbc.nu>.
Garrett Rooney wrote:

>On Sat, Jul 27, 2002 at 03:53:00AM +0200, Branko _ibej wrote:
>
>  
>
>>Righ, fine, great, now please enlighten me as to why we seem to have yet 
>>another human-readable date format?
>>
>>I'm very close to -1 here. I suggest some effort should be made to make 
>>the h-r date format customizable in ~/.subversion/options, and perhaps 
>>with a --date-format flag (for output parsers). Then have "svn ls" just 
>>use svn_time_to_human_nts(), or whatever the function is. I wouldn't 
>>mind if there were separate customizations for "avn log" and "svn ls".
>>    
>>
>
>i would love it if we had a 'short format' and a 'log format', so 'svn
>ls' and 'svn log' could both use standard functions for thier needs.
>
>right now though, the output of svn_time_to_human_nts() is just too
>long.  it fills like half the screen on an 80 column display.
>  
>

Yes, that's why this is an auspicious time for adding date format 
customization.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sat, Jul 27, 2002 at 03:53:00AM +0200, Branko _ibej wrote:

> Righ, fine, great, now please enlighten me as to why we seem to have yet 
> another human-readable date format?
> 
> I'm very close to -1 here. I suggest some effort should be made to make 
> the h-r date format customizable in ~/.subversion/options, and perhaps 
> with a --date-format flag (for output parsers). Then have "svn ls" just 
> use svn_time_to_human_nts(), or whatever the function is. I wouldn't 
> mind if there were separate customizations for "avn log" and "svn ls".

i would love it if we had a 'short format' and a 'log format', so 'svn
ls' and 'svn log' could both use standard functions for thier needs.

right now though, the output of svn_time_to_human_nts() is just too
long.  it fills like half the screen on an 80 column display.

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: I like the new output of 'ls'

Posted by Branko Čibej <br...@xbc.nu>.
Ben Collins-Sussman wrote:

>I like the output of 'svn ls' now, oh yes I do.  Nice job, Garrett.
>
>Notice the distinct similarity to 'ls -l':
>
>$ svn ls http://svn.collab.net/repos/logos
>http://svn.collab.net/repos/logos:
>_      25 anonymou     2807 Jul 25 19:07 README.html
>_      42 anonymou     1803 Jul 26 11:07 VOTES
>_      42 anonymou     5040 Jul 26 11:07 entries.html
>_      42 anonymou        0 Jul 26 11:07 images/
>_      29 anonymou        0 Jul 26 00:07 src/
>
>$ ls -l logos
>total 24
>-rw-r--r--  1 sussman  users  2807 Jul 26 09:13 README.html
>-rw-r--r--  1 sussman  users  1803 Jul 26 12:04 VOTES
>-rw-r--r--  1 sussman  users  5040 Jul 26 12:04 entries.html
>drwxr-xr-x  3 sussman  users  1024 Jul 26 16:04 images/
>drwxr-xr-x  3 sussman  users   512 Jul 26 09:13 src/
>  
>

Righ, fine, great, now please enlighten me as to why we seem to have yet 
another human-readable date format?

I'm very close to -1 here. I suggest some effort should be made to make 
the h-r date format customizable in ~/.subversion/options, and perhaps 
with a --date-format flag (for output parsers). Then have "svn ls" just 
use svn_time_to_human_nts(), or whatever the function is. I wouldn't 
mind if there were separate customizations for "avn log" and "svn ls".

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org