/// <summary> /// Perform the update. /// </summary> /// <param name="connection"></param> public void Execute(ICommandConnection connection) { if (workingDirectory.FoldersToUpdate == null) { LOGGER.Info("Nothing to update on WorkingDirectory.FoldersToUpdate."); return; } Folder[] _foldersToUpdate = (Folder[])workingDirectory.FoldersToUpdate.Clone(); foreach (Folder folder in _foldersToUpdate) { this.SetDirectory(connection, folder); Tag tag = folder.Tag; if (null != tag) { connection.SubmitRequest(new StickyRequest(tag.FileContents)); } if (workingDirectory.HasOverrideDirectory) { connection.SubmitRequest(new ArgumentRequest(ArgumentRequest.Options.OVERRIDE_DIRECTORY)); connection.SubmitRequest( new ArgumentRequest(workingDirectory.OverrideDirectory)); } if (this.Revision != null && this.Revision != string.Empty) { connection.SubmitRequest(new ArgumentRequest(ArgumentRequest.Options.REVISION)); connection.SubmitRequest(new ArgumentRequest(this.Revision)); } if (workingDirectory.HasDate) { connection.SubmitRequest(new ArgumentRequest(ArgumentRequest.Options.DATE)); connection.SubmitRequest(new ArgumentRequest(workingDirectory.GetDateAsString())); } foreach (DictionaryEntry dicEntry in folder.Entries) { Entry entry = (Entry)dicEntry.Value; // directory entry modifications are not tracked in cvs, // once a directory is created it cannot be removed if (!entry.IsDirectory) { DateTime old = entry.TimeStamp; entry.TimeStamp = entry.TimeStamp; this.SendFileRequest(connection, entry); } } connection.SubmitRequest(new UpdateRequest()); } }