开发者

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

开发者 https://www.devze.com 2022-12-13 19:32 出处:网络
How can I to detect subversion file/folder renames or moves when doing comparisons betwee开发者_运维技巧n revisions?How can I distinguish them from a \"normal\" add and delete?SvnLogEventArgs has a pr

How can I to detect subversion file/folder renames or moves when doing comparisons betwee开发者_运维技巧n revisions? How can I distinguish them from a "normal" add and delete?


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号