[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Lost History of a file by just changing it and committing

From: Mark Phippard <MarkP_at_softlanding.com>
Date: 2005-09-23 15:49:08 CEST

news <news@sea.gmane.org> wrote on 09/23/2005 06:17:22 AM:

> I'm having a strange problem with Eclipse 3.1 / Subclipse 0.9.34
(JavaSVN):
>
> For several months, I've been updating a library in my project with just

> the new jar, resulting in a one-file-commit per new library release.
> Everything was going well, and the file accumulated a nice history.
>
> This time, I committed the following:
>
> commit -m "update to spring 1.2.5"
> /home/aschildbach/dev/workspace/3moves/web/WEB-INF/lib/spring.jar
> Replacing
> /home/aschildbach/dev/workspace/3moves/web/WEB-INF/lib/spring.jar
> Transmitting file data ...
> Committed revision 1837.
>
> Looks good, doesn't it?

No. The Replacing means that an svn delete and svn add were done locally
prior to the commit. Severing the history. If the console view was
showing when you replaced the JAR, you should have been able to see those
operations run.

This was a bug in Eclipse 2.x. When you dragged and dropped a file into
the workspace from your file system, Eclipse would fire the MoveDeleteHook
causing the original file to be processed as a delete. This was fixed in
Eclipse 3.x, maybe they have a regression?

You do not say how you put the new JAR into place.

I do this pretty regularly in Subclipse whenever I have a new JAR of
JavaHL, JavaSVN or svnClientAdapter to include. I have not run into this
problem myself. I still use Eclipse 3.0 for my main environment though.

> But now the file is still marked as changed/dirty, and if I look at the
> files history, its empty! This looks like a bug (and a bad one, I
think).

It is not likely to be a Subclipse/Subversion bug. We do not arbitrarily
decide to issue svn delete. Eclipse has to tell us to do it.

> Can I somehow ressurect the history? Unfortunately, I have done several
> more commits after the one above.

The history is still there, it just isn't affilitated with the current
file. You can get the old history with the svn log command by specifying
the old revision range. No way to do this within Eclipse though. You
could run svn copy to copy the old revision to HEAD. But you would lose
the intervening history.

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
Received on Fri Sep 23 23:49:08 2005

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.