Example #1
0
        public static SvnInfoEventArgs Parse(string text)
        {
            using (var sr = new StringReader(text))
            {
                var doc = XDocument.Load(sr);
                var obj = new SvnInfoEventArgs()
                {
                    Path               = doc.XPathSelectElement("/info/entry").Attribute("path").Value,
                    RepositoryRoot     = new Uri(doc.XPathSelectElement("/info/entry/repository/root").Value + "/"),
                    Revision           = long.Parse(doc.XPathSelectElement("/info/entry").Attribute("revision").Value),
                    Uri                = new Uri(doc.XPathSelectElement("/info/entry/url").Value, UriKind.RelativeOrAbsolute),
                    LastChangeRevision = long.Parse(doc.XPathSelectElement("/info/entry/commit").Attribute("revision").Value)
                };

                return(obj);
            }
        }
Example #2
0
        public void GetBranchInfo(string path, out long revision, out string source, out long sourceRevision)
        {
            var info = SvnInfoEventArgs.Run(path);

            this.GetBranchRevision(info.RepositoryRoot, info.Uri, out revision, out source, out sourceRevision);
        }