Nathan
Nathan

Reputation: 10774

How to Detect svn file/folder renames or moves with SharpSvn?

How can I to detect subversion file/folder renames or moves when doing comparisons between revisions? How can I distinguish them from a "normal" add and delete?

Upvotes: 3

Views: 722

Answers (1)

Sander Rijken
Sander Rijken

Reputation: 21615

SvnLogEventArgs has a property ChangedPaths. This property contains the paths changes in that revision. It has an Action, CopyFromPath, CopyFromRevision and Path.

If CopyFromPath and CopyFromRevision are set on the file that was added, it was a copy with history (then there's no related delete action, common when branching), or rename/move (when there is a related delete action).

Upvotes: 2

Related Questions