开发者

SharpSVN and new/modified files in a revision

How is 开发者_如何学Cit possible to get list of all files (path/name only) which has been added or modified in a specific revision?


You can use SvnClient.Log() for that. Just make sure that it retrieves only a single revision by specifying a narror revision range like you see in the code below

using (SvnClient client = new SvnClient())
{
    client.Log(
        reposUri,
        new SvnLogArgs {Range = new SvnRevisionRange(9999, 9999)},
        (o, e) =>
            {
                foreach (SvnChangeItem changeItem in e.ChangedPaths)
                {
                    Console.WriteLine(
                        string.Format(
                            "{0} {1} {2} {3}",
                            changeItem.Action,
                            changeItem.Path,
                            changeItem.CopyFromRevision,
                            changeItem.CopyFromPath));
                }
            });
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜