[p4] Using changelists instead of labels for nightly builds
dlewis at vignette.com
Wed Mar 9 16:09:51 PST 2005
> Of course. another way to detect that 'nothing changed' is to first
> sync the last successful build, and then sync 'latest'. If nothing
> actually sync'ed, then you know nothing has changed.
> Performance should really only be an issue if you have hundreds of
> thousands of files. (read: db's don't even come close to fitting in
actually, determining the highest change number for a client is somewhat
compute-intensive, at least the way I used to do it. I think I was doing
p4 -c client changes -m1 @client, or some such.
This may have improved in recent releases, but around 2002.2 it was taking
about a minute of cpu, locking tables, etc. for about 6-10k files.
I just ran that and it seemed to run just fine, on 2004.2
but anyway, I started just doing a p4 have and finding the highest changenumber
in the output. Very low overhead.
Best is to sync *to* a specific changenumber. I was doing the extra work
in order to nail down a date <-> changenumber relationship. since multiple
changenumbers can go in during a second, you kind of have to sync to the
time and then find out the client's current highest changenumber.
If I had it to do over, I'd just use the changenumbers, because the
extra work is not worth it.
More information about the perforce-user