Base class for revisions to a VSS item.
Exemplo n.º 1
0
 private void fixSequence(VssItem item, VssRevision revision)
 {
     if (timeFixList != null)
     {
         foreach (TimeFix timeFix in timeFixList)
         {
             DateTime time = revision.DateTime;
             if (time.CompareTo(timeFix.start) > 0 && time.CompareTo(timeFix.end) < 0)
             {
                 int version = revision.Version;
                 revision.FixDateTime(timeFix.newTime);
                 string msg = item.Name + "(" + item.PhysicalName + ")";
                 logger.WriteLine("changed time " + time + " to " + timeFix.newTime + " for item " + msg + "@" + version);
             }
         }
     }
 }
Exemplo n.º 2
0
        private void checkRevisionTime(VssItem item, VssRevision revision1, VssRevision revision2)
        {
            int version1 = revision1.Version;
            int version2 = revision2.Version;
            DateTime time1 = revision1.DateTime;
            DateTime time2 = revision2.DateTime;

            if (version1 > version2)
            {
                string msg = item.Name + "(" + item.PhysicalName + ")";
                logger.WriteLine("***** warning: revision number out of sequence: " + version1
                    + " before " + version2 + " for item " + msg);
            }
            if (time1.CompareTo(time2) > 0)
            {
                string msg = item.Name + "(" + item.PhysicalName + ")";
                logger.WriteLine("***** warning: revision time out of sequence: " + time1 + "@" + version1
                    + " later than " + time2 + "@" + version2 + " for item " + msg);

                // as we are only looking at items that are out of sequence, we try to fix
                // each of them as it may be the first or the second
                fixSequence(item, revision1);
                fixSequence(item, revision2);
            }
        }