You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alexander Shenkin <su...@shenkin.org> on 2012/01/30 17:06:19 UTC

What happens when revision numbers are not chronological?

Hi Folks,

I've used an import script to import two bunches of files in the same
repository.  This import script sets the commit time of each file
(svn:date property) to the original modified-time of the file.  So, when
I added the second batch of files, the dates associated with the
revision numbers are no longer chronological.  That is, rev 5 might have
an svn:date of 1/1/2011, and rev 6 might have an svn:date of 1/1/2010
for example.

I'm not planning on doing anything overly complex with svn - i probably
won't be branching or merging.  However, I would like to be a little
more educated about the risks that I am running.  Anyone know?

thanks!

Re: What happens when revision numbers are not chronological?

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jan 30, 2012 at 11:06:19AM -0500, Alexander Shenkin wrote:
> Hi Folks,
> 
> I've used an import script to import two bunches of files in the same
> repository.  This import script sets the commit time of each file
> (svn:date property) to the original modified-time of the file.  So, when
> I added the second batch of files, the dates associated with the
> revision numbers are no longer chronological.  That is, rev 5 might have
> an svn:date of 1/1/2011, and rev 6 might have an svn:date of 1/1/2010
> for example.
> 
> I'm not planning on doing anything overly complex with svn - i probably
> won't be branching or merging.  However, I would like to be a little
> more educated about the risks that I am running.  Anyone know?
> 
> thanks!

See the warning at the bottom of this page:
http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html#svn.tour.revs.dates

Basically, you are confusing the binary search algorithm that is
invoked when you pass a date argument to the -r option. Other than
that, there is no harm.

Re: What happens when revision numbers are not chronological?

Posted by Alexander Shenkin <su...@shenkin.org>.
thanks all for your helpful replies.

On 1/30/2012 1:13 PM, Ryan Schmidt wrote:
> On Jan 30, 2012, at 10:06, Alexander Shenkin wrote:
>
>> I've used an import script to import two bunches of files in the same
>> repository.  This import script sets the commit time of each file
>> (svn:date property) to the original modified-time of the file.  So, when
>> I added the second batch of files, the dates associated with the
>> revision numbers are no longer chronological.  That is, rev 5 might have
>> an svn:date of 1/1/2011, and rev 6 might have an svn:date of 1/1/2010
>> for example.
>>
>> I'm not planning on doing anything overly complex with svn - i probably
>> won't be branching or merging.  However, I would like to be a little
>> more educated about the risks that I am running.  Anyone know?
> You will not be able to use the date syntax to specify revisions. For example:
>
> svn log -r '{2012-01-01}:{2012-01-11}'
>
> This is not guaranteed to return sensible results if your revisions are not in ascending chronological order. I'm not sure what it will do, but I wouldn't be surprised if it returned revisions outside the requested range, and/or did not return the revisions that are in the requested range. If I remember correctly, the Subversion repository of the Apache Software Foundation has non-chronological revisions, so you could do some tests against their repository if you're curious.
>
> But that's the only problem I know of.
>
>
>

Re: What happens when revision numbers are not chronological?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 30, 2012, at 10:06, Alexander Shenkin wrote:

> I've used an import script to import two bunches of files in the same
> repository.  This import script sets the commit time of each file
> (svn:date property) to the original modified-time of the file.  So, when
> I added the second batch of files, the dates associated with the
> revision numbers are no longer chronological.  That is, rev 5 might have
> an svn:date of 1/1/2011, and rev 6 might have an svn:date of 1/1/2010
> for example.
> 
> I'm not planning on doing anything overly complex with svn - i probably
> won't be branching or merging.  However, I would like to be a little
> more educated about the risks that I am running.  Anyone know?

You will not be able to use the date syntax to specify revisions. For example:

svn log -r '{2012-01-01}:{2012-01-11}'

This is not guaranteed to return sensible results if your revisions are not in ascending chronological order. I'm not sure what it will do, but I wouldn't be surprised if it returned revisions outside the requested range, and/or did not return the revisions that are in the requested range. If I remember correctly, the Subversion repository of the Apache Software Foundation has non-chronological revisions, so you could do some tests against their repository if you're curious.

But that's the only problem I know of.