Exemplo n.º 1
0
        /// <summary>
        /// Query the server for multiple changelists in a range specified by the query parameter
        /// </summary>
        /// <param name="InQuery">Changelist query representing a start and end changelist number to query the Perforce server for changelists between</param>
        /// <return>Returns a list of changelists</return>
        public IList <Changelist> QueryChangelists(P4ChangelistSpanQuery InQuery)
        {
            IList <Changelist> ChangelistRecordSet = null;

            // Only attempt to query if actually connected
            if (ConnectionStatus == EP4ConnectionStatus.P4CS_Connected)
            {
                try
                {
                    Options options = new Options();

                    //Extended descriptions
                    options.Add("-l", null);

                    //Only submitted changelists
                    options.Add("-s", "submitted");

                    //Filter by user
                    if (!string.IsNullOrWhiteSpace(InQuery.FilterUser))
                    {
                        options.Add("-u", InQuery.FilterUser);
                    }

                    ChangelistRecordSet = mP4Repository.GetChangelists(options, InQuery.FileFilter);
                }
                catch (P4Exception E)
                {
                    Console.WriteLine("Error running Perforce command!\n{0}", E.Message);
                }
            }
            return(ChangelistRecordSet);
        }
Exemplo n.º 2
0
		/// <summary>
		/// Query the server for multiple changelists in a range specified by the query parameter
		/// </summary>
		/// <param name="InQuery">Changelist query representing a start and end changelist number to query the Perforce server for changelists between</param>
		/// <return>Returns a list of changelists</return>
        public IList<Changelist> QueryChangelists(P4ChangelistSpanQuery InQuery)
		{
            IList<Changelist> ChangelistRecordSet = null;

			// Only attempt to query if actually connected
			if (ConnectionStatus == EP4ConnectionStatus.P4CS_Connected)
			{
				try
				{
                    Options options = new Options();
                    
                    //Extended descriptions
                    options.Add("-l",null);

                    //Only submitted changelists
                    options.Add("-s", "submitted");

                    //Filter by user
                    if (!string.IsNullOrWhiteSpace(InQuery.FilterUser))
                    {
                        options.Add("-u", InQuery.FilterUser);
                    }

                    ChangelistRecordSet = mP4Repository.GetChangelists(options, InQuery.FileFilter);
				}
				catch (P4Exception E)
				{
					Console.WriteLine("Error running Perforce command!\n{0}", E.Message);
				}
			}
            return ChangelistRecordSet;
		}