[Buildbot-devel] p4poller.py changes detection since last sync

William Deegan bill at baddogconsulting.com
Mon Oct 28 19:24:47 UTC 2013


Yasser,


On Oct 28, 2013, at 12:03 PM, Yasser LEBON <yasser.lebon at gmail.com> wrote:

> After clarification with team responsible of Perforce in my company it seems that using @HEAD or @NOW the scanning occurs at the level of the db.rev instead of db.change that gives differents impacts on Perforce server. I contacted Perforce and here is their answer:
> "The difference has to do with the query being different since you are using different arguments. The result may be the same but dealing with the internals is very different, if you are familiar with relational database you know that the way you construct your query has a lot to do with the performance.

That's kind of a vague response from Perforce.
Did they say which one is better?

> 
> Actually, I made a patch to change the p4poller.py behaviour. I used "p4 changes -m1" to have the last revision and use the result output  to get the changelists range "p4 changes @%d, @%d" % (lastChange, headRevision)

Does this improve the hit on your server?

Thanks,
Bill

> 
> Regards
> Yasser
> 
> 
> 
> 2013/9/27 William Deegan <bill at baddogconsulting.com>
> Yasser,
> On Sep 19, 2013, at 2:14 PM, Yasser LEBON <yasser.lebon at gmail.com> wrote:
> 
> >
> > Hello,
> >
> > I noticed that buildbot use the following command to get perforce depot list of changes since last sync:
> >
> > 'p4 changes %s...@%d,now' % (self.p4base, self.last_change+1)
> >
> > Is there any reason why we use 'now' instead of '#head'? Thanks
> 
> I'm not sure why the previous maintainer used ,now, but the result should be the same.
> 
> From p4 docs:
> * The datespec @now can be used as a synonym for the current date
> and time.
> * file#head The head revision (latest version) of file. Except where explicitly
> noted, this is equivalent to referring to the file without a revision
> specifier.
> 
> Are you aware of any functional difference?
> -Bill
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20131028/8323644d/attachment.html>


More information about the devel mailing list