views:

83

answers:

2

We had a file OLD_FILE with very long history ~ 100 revisions.

Then this file was removed from repository. And new file NEW_FILE with content of OLD_FILE was created. Don't ask me - why file was not just renamed ;)

Then NEW_FILE was changed 5 times. And then NEW_FILE was renamed to OLD_FILE using svn.

Now if we try to see history for OLD_FILE - we see only last 5 revisions related to NEW_FILE. But we do not see a lot of revisions from first OLD_FILE's history.

Is it possible to fix repository in order to see all revisions both for OLD_FILE(~100 revisions) and NEW_FILE(5 revisions)? I would like to see all these revisions using command svn lof -q OLD_FILE

BTW When I try to call "Show Log" from TortoiseSVN I can see next dialog:


Go offline?

There has been a problem connecting the server. Do you want to see the cached data instead?

Please understand that the cached data may be outdated, incomplete or even misleading due to incomplete history.

Offline for Now. Permanently offline. Don't go offline


And then I can see all 100 revisions for first OLD_FILE.

What does it mean?

+1  A: 

Since Subversion doesn't know that NEW_FILE and OLD_FILE are related, the answer to your question is no; it won't display the consolidated history you want. But you can still access the ~100 old revisions if you supply an appropriate peg revision.

For example:

svn log http://my.repos.com/path/to/OLD_FILE@42

where 42 is a revision before the original OLD_FILE was deleted.

Michael Hackner
+1  A: 

The short answer is no.

But if the dates, revision numberss and relative order to other changes of the NEW_FILE changes are not significant, you could:

Restore the old revision history:

svn rm OLD_FILE 
svn copy -r when_old_was_gone OLD_FILE OLD_FILE

Fill the new file history with svn diff of all changes to NEW_FILE, apply the patch and commit. You have to diff, patch, commit for every change separately.

Another workaround is to retrieve the log for all revisions with tortoise svn and filter by path. All changes of the same path will be selected.

Thomas Jung