How to recognise SVN moves?

View: New views
2 Messages — Rating Filter:   Alert me  

How to recognise SVN moves?

by Georgios Gousios :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using the low level API. In an example repository and using a single commit, I move /devel/trunk to /trunk, /devel/branches to /branches and /devel/tags to /tags. The state of the repo before the change is

/
  -devel
     -trunk
     -tags
     -branches

After the move the state is
/
  -trunk
  -tags
  -branches

In the log retrieved with SVNKit for this commit it appears as though 3 directories have been deleted and 3 new were added. Is there any way to recognise that this was actually a move operation and not a deletion/addition operation? The svn cmd line client will report in the svn log output that those directories were actually moved

Thanks in advance,
Georgios

Re: How to recognise SVN moves?

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Georgios,

SVNLogEntry contains map of changed paths (path:SVNLogEntryPath pairs).

SVNLogEntryPath.getCopyPath() and SVNLogEntryPath.getCopyRevision() will
return copy from path and copy from revision for moved or copied files
or directories.

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

Georgios Gousios wrote:

> I am using the low level API. In an example repository and using a single
> commit, I move /devel/trunk to /trunk, /devel/branches to /branches and
> /devel/tags to /tags. The state of the repo before the change is
>
> /
>   -devel
>      -trunk
>      -tags
>      -branches
>
> After the move the state is
> /
>   -trunk
>   -tags
>   -branches
>
> In the log retrieved with SVNKit for this commit it appears as though 3
> directories have been deleted and 3 new were added. Is there any way to
> recognise that this was actually a move operation and not a
> deletion/addition operation? The svn cmd line client will report in the svn
> log output that those directories were actually moved
>
> Thanks in advance,
> Georgios

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...

LightInTheBox - Buy quality products at wholesale price!