Example #1
0
        public int GetLastSyncedRevisionFromDestination()
        {
            Svn2SvnLogArgs logArgs = new Svn2SvnLogArgs();

            logArgs.StrictNodeHistory = true;
            logArgs.ThrowOnError      = true;

            _client.Log(_svnPath, logArgs, new EventHandler <SvnLogEventArgs>(OnLogDelegate));

            int lastSyncedRevision = 0;

            foreach (KeyValuePair <long, SvnLogEventArgs> revisionPair in logArgs.revisions)
            {
                String msg = revisionPair.Value.LogMessage;

                if (msg.Contains(_initialSearchString))
                {
                    int idx    = msg.IndexOf(_revIndicatorString) + _revIndicatorString.Length;
                    int endidx = msg.IndexOf(' ', idx);

                    String sr = msg.Substring(idx, endidx - idx);

                    lastSyncedRevision = Convert.ToInt32(sr);
                }
            }

            return(lastSyncedRevision);
        }
Example #2
0
        public int GetLastSyncedRevisionFromDestination()
        {
            Svn2SvnLogArgs logArgs = new Svn2SvnLogArgs();
            logArgs.StrictNodeHistory = true;
            logArgs.ThrowOnError = true;

            _client.Log(_svnPath, logArgs, new EventHandler<SvnLogEventArgs>(OnLogDelegate));

            int lastSyncedRevision = 0;

            foreach (KeyValuePair<long, SvnLogEventArgs> revisionPair in logArgs.revisions)
            {
                String msg = revisionPair.Value.LogMessage;

                if (msg.Contains(_initialSearchString))
                {
                    int idx = msg.IndexOf(_revIndicatorString) + _revIndicatorString.Length;
                    int endidx = msg.IndexOf(' ', idx);

                    String sr = msg.Substring(idx, endidx - idx);

                    lastSyncedRevision = Convert.ToInt32(sr);
                }
            }

            return lastSyncedRevision;
        }