[p4python] p4python: changes between dates does not give expectedresult

Robert Cowham robert at vizim.com
Fri Sep 17 06:20:29 PDT 2010


In

> p4.run("changes","-l","-t","-ssubmitted","-u","user", 
> "branch/.", "@" +
> date1 + ",@" + date2) , where date2 and date1 are variables and
> date2>date1 

This bit doesn't work:
> "branch/.", "@" +
> date1 + ",@" + date2) 

To:

p4.run("changes","-l","-t","-ssubmitted","-u","user", 
	"branch/...@" + date1 + ",@" + date2)


Don't forget that perforce dates need to be in this format:

	yyyy/mm/dd[:hh:mm:ss]
E.g.
	2009/10/24

> -----Original Message-----
> From: p4python-bounces at perforce.com 
> [mailto:p4python-bounces at perforce.com] On Behalf Of Kostas Kevrekidis
> Sent: 17 September 2010 13:47
> To: p4python at perforce.com
> Subject: [p4python] p4python: changes between dates does not 
> give expectedresult
> 
> Hi,
> 
>  
> 
> I am using python to parse perforce. I am trying to use the command:
> 
>  
> 
> p4.run("changes","-l","-t","-ssubmitted","-u","user", 
> "branch/.", "@" +
> date1 + ",@" + date2) , where date2 and date1 are variables and
> date2>date1
> 
>  
> 
> to receive a list of changes submitted between date1 and 
> date2 of a specific user. I also would like to get a date 
> format as described in the documentation:
> 
> "If you use the -t option to display the time of each 
> changelist, the format is: 
> 
> Change num on date hh:mm:ss by user at client [status] description"
> 
>  
> 
>  
> 
>  I don't getting the desired results at all. Instead I am receiving 
> 
>  
> 
> 1.	A list of 101 items, where every item is a dictionary, that are
> of date > date1
> 2.	The date is in the form 1209135617
> 
>  
> 
> I suppose the parameters are not received very well. Although the "-l"
> parameter is recognized the rest are ignored or have to be 
> provided in a different way than described in the 
> documentation. The "-s" and "submitted" parameter and value 
> for example have to be concatenated in order to be perceived 
> correctly something that is not documented anywhere. 
> 
> I tried many different combinations in providing parameters 
> and changelist numbers. 
> 
>  
> 
> Can you please give me some information on this behavior? Is 
> there maybe a work around?
> 
>  
> 
>  
> 
> Regards,
> 
> Kostas
> 
>  
> 
>  
> 
> PS:
> 
> >>> print sys.version_info
> 
> (2, 6, 5, 'final', 0)
> 
>  
> 
> 




More information about the p4python mailing list