Пример #1
0
            public bool Run(PerforceConnection Perforce, TextWriter Log, out string ErrorMessage)
            {
                this.ServerAndPort = Perforce.ServerAndPort;
                this.UserName      = Perforce.UserName;

                PerforceSpec Spec;

                if (!Perforce.TryGetClientSpec(WorkspaceName, out Spec, Log))
                {
                    ErrorMessage = String.Format("Unable to get info for client '{0}'", WorkspaceName);
                    return(false);
                }

                string CurrentStreamName = Spec.GetField("Stream");

                if (CurrentStreamName == null || CurrentStreamName != StreamName)
                {
                    bRequiresStreamSwitch = true;
                    bHasOpenFiles         = Perforce.HasOpenFiles(Log);
                }

                ErrorMessage = null;
                return(true);
            }