tags:

views:

36

answers:

3

I am trying to analyze what happened in a software development effort. I have a copy of the subversion repository but while working my way through it I found something I wasn't expecting.

The order of the revisions does not coincide with the date order.

Example:
Revision 1 - Day 0
Revision 2 - Day 3
Revision 3 - Day 10
Revision 4 - Day 4
Revision 5 ...

I am not very familiar with shared repositories. I was assuming that the order of revisions would be the same by revision number and date. What may be the reasons for these discrepancies? I can also see some consecutive revisions with reversed time differences of months, not just a few days or hours between them.

A: 

The dates do not appear to be in order because the revision numbers you see could be from different sources on different branches, that is they are not all from the same branch or path.

Using your example, this is what the repository could look like (with time flowing from left to right):

trunk:  ---- r1  ----- r2  ---------------------- r10 ----
                         \                        /
                          \                      /
branch:                    --- r3, r5, r6, .. ---
Ether
Here the revisions are still linear to time, only when you get the history of trunk, you 'miss' some revisions
Sander Rijken
@Sander: yes, unless some revisions were added later (that is, "revising history after the fact"), the revisions along a particular branch should all be in order of time.
Ether
How would you do that? Subversion doesn't allow that?
Sander Rijken
+2  A: 

This can happen when you import data from another source. For instance, you can create a repository, commit a few revisions and then svnadmin load more revisions into it.

Sander Rijken
+1 This is the real root of what's happening.
ZoogieZork
+2  A: 

Was this repository generated from a CVS repository via cvs2svn? If the repository was generated piecemeal from the CVS repository, the dates will be out-of-order. Also if the dates in the CVS repository were out of order then that will be carried along into the Subversion repository.

The same applies actually to anything which manually loads dumps of revisions into the repository, e.g. combining two repositories together.

ZoogieZork
+1 That's pretty much the same as what I answered. Can also happen because of other import tools, vss2svn for instance.
Sander Rijken
Yeah, I was trying to remember all the ways our own repositories have ended up this way, and at the end realized that it all came down to `svnadmin load` :)
ZoogieZork
It most likely happens when merging several cvs / vss/ other repositories into one Subversion repository
Sander Rijken