You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by ja...@jrv.org on 2003/08/20 20:40:13 UTC

Changing svn:date?

I'm trying to write a program to import from old PVCS files into SVN
and retain the authorship and timestamps.

I'm wondering if doing a propset of svn:date is going to really do
what I want, which is to allow me to retrieve an entire project as of
a particular date.  The files are being committed one by one, revision
by revision from the original PVCS archives

The trace below shows part of the conversion cycle happening.  Next is
a failed attempt to retrieve a revision by date, and lastly a log
showing that the propsets did do something.

I'd be interested in hearing if there are better strategies for
converting from an existing VCS to SVN retaining timestamps.

cmd: get -r1.2 ..\pvcs2svn\vlogs\MISC.C_V
Network PVCS(get) V2.1c for MSDOS
Copyright 1985, 1986, 1988 POLYTRON Corp.  All rights reserved.
MISC.C <- ..\pvcs2svn\vlogs\MISC.C_V
rev 1.2
cmd: svn commit -F \s3eg.2 MISC.C
Sending        MISC.C
Transmitting file data .
Committed revision 60.
cmd: svn propset svn:author --revprop -rHEAD JAMES MISC.C
property `svn:author' set on repository revision '60'
cmd: svn propset svn:date --revprop -rHEAD 1991-01-31T14:34:46.000000Z MISC.C
property `svn:date' set on repository revision '60'

C:\src\lib>svn up -r  {2/1/1991}
svn: Filesystem has no item
svn: REPORT request failed on '/svn/!svn/vcc/default'
svn:
file not found: revision `0', path `/trunk/lib'

C:\src\lib>svn log -r60 MISC.C
------------------------------------------------------------------------
rev 60:  JAMES | 1991-01-31 08:34:46 -0600 (Thu, 31 Jan 1991) | 1 line

Add code to deal properly with out-of-memory situations.
------------------------------------------------------------------------

C:\src\lib>

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

Re: Changing svn:date?

Posted by Michael Wood <mw...@its.uct.ac.za>.
On Wed, Aug 20, 2003 at 03:40:13PM -0500, james-tigris@jrv.org wrote:
> I'm trying to write a program to import from old PVCS files into SVN
> and retain the authorship and timestamps.
> 
> I'm wondering if doing a propset of svn:date is going to really do
> what I want, which is to allow me to retrieve an entire project as of
> a particular date.  The files are being committed one by one, revision
> by revision from the original PVCS archives
> 
> The trace below shows part of the conversion cycle happening.  Next is
> a failed attempt to retrieve a revision by date, and lastly a log
> showing that the propsets did do something.
> 
> I'd be interested in hearing if there are better strategies for
> converting from an existing VCS to SVN retaining timestamps.
[snip]

A better strategy might be "don't reinvent the wheel unnecessarily" :)

I believe VCP supports converting from PVCS to something else.  clkao
has been working on supporting Subversion as a target for VCP.

I seem to have been promoting VCP quite a bit lately, which is a little
strange, since I've never used it.  Might be worth a look.

-- 
Michael Wood <mw...@its.uct.ac.za>

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

Re: Changing svn:date?

Posted by ja...@jrv.org.
> Date: Thu, 21 Aug 2003 00:33:37 +0200
> From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <br...@xbc.nu>
>
> You must be very, very careful when changing svn:date. At the moment,
> SVN assumes that commit dates increase monotonically with revision
> numbers. So, while it's possible to change svn:date, braking this
> assumption would mean that the -r{date} option would not work reliably
> any more.

OK, I guess the only way to convert an existing VCS database to SVN and
retain timestamps is to generate a DUMP file and create an entire new
repository.  This isn't worth it for my application.

For now I think I'll just add a property to each revision that is the
timestamp from the source database, which will let me figure out what
to do later.

I assume this also means that great care must be taken that the system
clock on the server must never be set backwards.  This is an important
restriction that the book might highlight since it's not automatic.

(I'm assuming that svn:date is normally set by the sever)

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

Re: [resend] Re: Changing svn:date?

Posted by Ben Collins-Sussman <su...@collab.net>.
james-tigris@jrv.org writes:

> > Date: Thu, 21 Aug 2003 00:33:37 +0200
> > From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <br...@xbc.nu>
> >
> > You must be very, very careful when changing svn:date. At the moment,
> > SVN assumes that commit dates increase monotonically with revision
> > numbers. So, while it's possible to change svn:date, braking this
> > assumption would mean that the -r{date} option would not work reliably
> > any more.
> 
> I assume this means that great care must be taken that the system
> clock on the server must never be set backwards?  

Yes, indeed.  

A bunch of date pitfalls are documented in this issue:

   http://subversion.tigris.org/issues/show_bug.cgi?id=752

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

[resend] Re: Changing svn:date?

Posted by ja...@jrv.org.
> Date: Thu, 21 Aug 2003 00:33:37 +0200
> From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <br...@xbc.nu>
>
> You must be very, very careful when changing svn:date. At the moment,
> SVN assumes that commit dates increase monotonically with revision
> numbers. So, while it's possible to change svn:date, braking this
> assumption would mean that the -r{date} option would not work reliably
> any more.

I assume this means that great care must be taken that the system
clock on the server must never be set backwards?  This is an important
restriction that the book might highlight since it's not automatic,
particularly across reboots.

(I'm assuming that svn:date is normally set by the sever)


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

Re: Changing svn:date?

Posted by Branko Čibej <br...@xbc.nu>.
james-tigris@jrv.org wrote:

>I'm trying to write a program to import from old PVCS files into SVN
>and retain the authorship and timestamps.
>
>I'm wondering if doing a propset of svn:date is going to really do
>what I want, which is to allow me to retrieve an entire project as of
>a particular date.  The files are being committed one by one, revision
>by revision from the original PVCS archives
>
You must be very, very careful when changing svn:date. At the moment,
SVN assumes that commit dates increase monotonically with revision
numbers. So, while it's possible to change svn:date, braking this
assumption would mean that the -r{date} option would not work reliably
any more.

Yes, we have A Plan to remove this restriction in future.

-- 
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