bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for timezone handling in cvs log


From: Derek Robert Price
Subject: Re: Patch for timezone handling in cvs log
Date: Fri, 30 Apr 2004 14:21:44 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bart Robinson wrote:

>I think I know what you're getting at.  How about no -z option,
>and we always display in localtime.  If the user wants GMT
>output, or any other timezone supported on their system, they
>have to put it in their TZ env var, like
>
>    $ TZ=GMT cvs log foo
>or
>    $ TZ=GMT-5:30 cvs log foo
>
>I think that would be superior and simplify the code.


Exactly.

>However, I would prefer we still print the offset so they know
>that conversion has been done and they can save the output and
>read it in another locale (like in a mail message) and know what
>the time means.


Ok.

> >    2. You should be able to mix cvs_output() lines with
> >       cvs_output_tagged() lines.  The extensive conversion you
> >       performed on log.c was unecessary.  You should have only needed
> >       to convert the lines containing the dates.
>
>I agree I can get rid of some of that conversion but the bulk of
>it is necessary.  All the stuff dealing with the printing of a
>line like:
>
>  date: 2004/04/05 10:52:16-0700;  author: lomew;  state: Exp;
lines: +2 -1
>
>must use MT since the date is tagged.  The "version [locked by]"
>and "branches" lines don't need it.  (So the diffs won't shrink
>by more than about 10 lines, but I agree it is worth fixing.)


I knew this - it probably just looked like more of the file than it
was during my cursory read, but, like you said, still worth fixing.

>I could do something like
>
>    MT date [datestr]
>    M date: %s;  author...
>
>But that would make the code *much* more complicated and make
>backward compatibility more difficult.
>
>Another option would be to do:
>
>    MT date date: [datestr]
>    M ;  author: [the_author] stuff...
>
>But that means the code that parses the date MT tag would have


Of course not for both of these - I just meant that lines that are
output as only text tags through cvs_output_tagged() should be allowed
to travel their original route through cvs_output(), as you seem to
have understood in the fix you mention being approximately 10 lines.

Cheers,

Derek

- --
                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAkpk3LD1OTBfyMaQRAh5dAJ0ee19y7fTNh48tSvqvqPG8fx8c0QCgud0y
MqyFpe8gglQPTCkftjcs4L8=
=F791
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]