[p4] Automatic Syncs w/ Production Directories

David Ferguson daf at vmware.com
Thu Sep 7 11:23:05 PDT 2006


 
I'm missing something -- How is this different than a frequent scheduled
cronjob?  Or do you want to avoid the polling of the cron/at? 

I'd probably set a post-submit trigger to sync the variously affected
clients.  You'd probably end up needing some kind of queue system though
since the production clients are rarely (at least IMO) visible on the
server...  Maybe the trigger enables a client-specific counter, that gets
polled by a frequent cronjob and the client gets synced if the counter was
updated?  That reduces the polling to a single counter call...  Currently, we
just run a sync every 10 minutes on our 'global shared' type clients -- but
now I'm thinking I kind of like the counter idea...  Will be watching for
your other responses...

-daf
-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Weintraub, David
Sent: Thursday, September 07, 2006 6:34 AM
To: perforce-user at perforce.com
Subject: [p4] Automatic Syncs w/ Production Directories

I've got an interesting question...
 
We have an account called "merbld" that is the owner of the Perforce server,
runs our triggers, and also is used for universal scripts and executables
that we use in the Unix environment. I've setup most of merbld's directories
to be Perforce clients. The merbld user has no write permission on the
Perforce depot, but does have read permission.
 
Users update the script or binary under merbld's control in their own views
(so we know who made the change), and then are suppose to go to merbld's
account and do a sync on the affected directories. What I'd like to do is to
automate this procedure -- when a change is submitted that affects the merbld
account, the correct merbld client is automatically sync'd to get the latest
changes. A way of automatically deploying the changes.
 
In fact, I could imagine this type of mechanism being used for automatically
deploying production directories. Right now, it is too easy to go to the
directory and make changes manually. We have no version history of the change
and may not even know who made the change.
An automated update system would make it much more likely that production
people make their changes in Perforce, so we have a history of the changes.
 
I am thinking to somehow use our review trigger to accomplish this task.
If the review daemon determines that one of the directories it is watching
has changed, it will automatically sync the correct production directory.
When I used ClearCase, we used what were called exported dynamic views. In
ClearCase, a view is equivalent to a Perforce client.
However, unlike Perforce clients, dynamic views were constantly sync'd with
the latest changes. Exporting a view allowed you to treat it as an NFS mount
point. When I was using Subversion, there was a lot of chatter on their
mailing list about setting up automatic "exports" of Subversion files into
production directories.
 
So, has anyone ever done anything like this in Perforce? If so, how did you
accomplish it? Is this a feature that others would fine handy to have in
Perforce? And, would this be a feature that should be built into Perforce and
other version control systems 

 

--

David Weintraub

eval "s//" . sprintf ("%x%x%x\n", 7912476, 9676484, 1201069) . "/";
tr/123456789abcd/acehklNoPrt !/; print; ?
_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user



More information about the perforce-user mailing list