threads / discuss / 719

new cvsps version fixes issues for cvs2git

Subject: new cvsps version fixes issues for cvs2git

## tl;dr

3 messages between May 26, 2005 and May 26, 2005.

replies: 2people: 2as markdown or json

David Mansfield· May 26, 2005, 04:02 UTC · lore
Hi,

I just put out the 2.1 tarball on http://www.cobite.com/cvsps/cvsps-2.1.tar.gz. I tested it out with the syslinux, mutt, and a bunch of my own repos. It fixes the following issues that were causing some of the problems with cvs2git:

1) proper detection and reporting of branch ancestry, with the -A 
option.  This patch was sent under separate cover, but now I also 
explicitly disallow the bogus 'import' branch from being an ancestor. 
The ancestor will only be reported when a new branch appears.
2) patchset ordering problems.  actual revision ancestry is considered 
when ordering the patchsets.  this mainly affects the 'patchset 1 and 
patchset 2 are swapped' problem, but could be others
3) patchset 'globbing' problems.  previously, cvsps would allow the same 
file into a patchset more than once.  this is clearly bogus, and now it 
isn't allowed, combined with #2 and some minor date tweaking, the 
ordering should be 'more perfect than ever.'
4) patchset date/time problems.  the date/time handling was bogus.  some 
of it was patched for some time in my tree, but not released.  also we 
now report all dates in LOCALTIME.  use the TZ variable to get a 
different time.  Note: 'cvs log' format is always UTC.

Linus, based on #4, you may want to set 'export TZ=UTC' before running, and handle date/time conversion in cvs2git counting on that. otherwise, I think problems may occur with daylight savings (apr/oct).

If there are any remaining issues, let me know.
David
Linus Torvalds· May 26, 2005, 04:20 UTC · re: David Mansfield · lore

Re: new cvsps version fixes issues for cvs2git

On Thu, 26 May 2005, David Mansfield wrote:
Show 9 quoted lines
> 
> 4) patchset date/time problems.  the date/time handling was bogus.  some 
> of it was patched for some time in my tree, but not released.  also we 
> now report all dates in LOCALTIME.  use the TZ variable to get a 
> different time.  Note: 'cvs log' format is always UTC.
> 
> Linus, based on #4, you may want to set 'export TZ=UTC' before running, 
> and handle date/time conversion in cvs2git counting on that.  otherwise, 
> I think problems may occur with daylight savings (apr/oct).

cvs2git only wants UTC times, and doesn't do any conversion, since that's the native git format (git considers all times to be UTC, but also records a "what timezone was the thing done in" so that if you want to, you can print it out not in localtime, but in "localtime as it was for the committer"). Nothing else really makes sense - it's totally senseless to print it out as "in localtime of user".

Since the CVS information doesn't contain any timezone, it would be bogus to use one, and the only sane git conversion is to always use UTC. Using the timezone of the converter is also bogus, since that just makes different converters get different results.

So I'd much rather see you add a flag that just always does the native CVS time (ie UTC)? Quite frankly, it's wrong to do anything else, exactly because it makes no sense to print out dates in a timezone that has no relevance (what relevance does Pacitic time have for somebody who committed something at 8AM Eastern? _None_).

The fact is, if we depend on people doign "TZ=UTC", people will forget, and then people will have different conversions.

(My personal preference would be to _default_ to UTC, and instead have a special flag that says "use localtime to print stuff out", since localtime really is the least relevant one most of the time)

			Linus
David Mansfield· May 26, 2005, 04:35 UTC · re: Linus Torvalds · lore

Re: new cvsps version fixes issues for cvs2git

Show 5 quoted lines
> 
> Since the CVS information doesn't contain any timezone, it would be bogus
> to use one, and the only sane git conversion is to always use UTC. Using 
> the timezone of the converter is also bogus, since that just makes 
> different converters get different results.

The cvs log is now properly handled as UTC. It wasn't before. That's one good thing. And yes, git conversion better always be UTC, no argument here.

Show 6 quoted lines
> 
> So I'd much rather see you add a flag that just always does the native CVS
> time (ie UTC)?  Quite frankly, it's wrong to do anything else, exactly
> because it makes no sense to print out dates in a timezone that has no
> relevance (what relevance does Pacitic time have for somebody who
> committed something at 8AM Eastern? _None_).

It will always print in the localtime of the user running cvsps, not the timezone of the commiter (in fact, we don't know the timezone of the committer at all). I hate committing something, running cvsps and having it tell me I'm about to commit in five hours, but I *do* see your point.

> 
> The fact is, if we depend on people doign "TZ=UTC", people will forget, 
> and then people will have different conversions.

That's true, that would be terrible. But I'm arguing that the actual conversion program (which actually wants machine readable output) should make it happen. If that means we need a shell-script wrapper than so-be-it. By letting cvsps display in any timezone, including UTC, it can work for everyone (keep the policy out of the program).

> (My personal preference would be to _default_ to UTC, and instead have a
> special flag that says "use localtime to print stuff out", since 
> localtime really is the least relevant one most of the time)
> 

The thing you may be missing (and, hey, why not?) is that some people will actually still be using cvs, and cvsps to them is a tool that produces output for humans. For you, it is a stone in the path to git's domination of the world.

I'll have to think about it. At the very least a flag requesting UTC, or a flag requesting localtime makes sense. Setting environment variables and then running a program always seemed a bit like abuse of global variables.

David

← back to recent threads