tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject [OT] Moving entire directory structures in svn
Date Mon, 25 Jun 2012 16:42:26 GMT

I apologize for another OT post to the dev list, but I know there are
svn experts here and it's somewhat relevant.

I have a project, recently migrated from CVS to SVN, and one of the
things I'd like to be able to do that I couldn't do in CVS is to re-name
files and do it all in one Big Commit.

Specifically, I'd like to be able to do things like re-name a Java
package which of course requires that all the files have a different
path in the source tree.

I've been experimenting without a commit and I've found that this seems
to work the way I'd like:

$ svn mv somefile someotherfile
$ svn log someotherfile

(Here, I get the log history from 'somefile' appearing under
'someotherfile' which leads me to believe that the history will
accompany the file as it gets committed).

Optimistically, I tried this:

$ mkdir src/newpackage
$ svn add src/newpackage
$ svn mv src/oldpackage src/newpackage
$ svn log src/newpackage/some/source/file/in/

path not found

Not wanting to break everything, I decided to revert everything.

I'm wondering if I need to do an 'svn mv' on each individual file, or if
all I need is a commit of all this stuff to actually have it take
effect. Since the directory structure hasn't been committed, maybe svn
can't try to give me the log.

Before I do something utterly stupid (yes, it's revision control so I
can undo it of course) I'd like to know if anyone has any suggestions
for how to move my files such that the file-log can accompany the files
as they get renamed.


View raw message