On 3/1/07, Andrew Brosnan <andrew@broscom.com> wrote:
> On 3/1/07 at 1:03 PM, andy.levy@gmail.com (Andy Levy) wrote:
>
> > On 3/1/07, Andrew Brosnan <andrew@broscom.com> wrote:
> > > Hello,
> > >
> > > I have a repos layout like
> > >
> > > trunk
> > > proj_a
> > > proj_b
> > > proj_c
> > >
> > > When wc1 commits I want a hook to update wc2. However, if wc1 only
> > > commits something in proj_a, I only want proj_a updated in wc2.
> Since
> > > post-commit only knows about repos path and revision number, how do
> I
> > > accomplish this?
> >
> > Have the first step of your hook script be to check what changed using
> > svnlook changed. Then, based on the paths changed, do whatever needs
> > to be done.
> >
> > HOWEVER, modifying the repository in a hook script can be troublesome.
> > If someone commits to wc1, then their WC is instantly out of date
> > because your hook will increment the global revision # when /trunk/wc2
> > is updated. I know modifying the in-flight transaction in the
> > pre-commit is considered a Bad Thing(tm); doing what you're asking is
> > less bad, but may still not be a great idea.
> >
> > Plus, you could find yourself in a loop if you're not every careful -
> > if that hook accidentally updates /trunk/wc1, it'll call the hook
> > again.
>
> The idea is to update the wc running a website, so only that one wc will
> auto-update. I was trying to avoid running svn up on the entire wc. when
> perhaps only a few files had been committed.
OK, that makes more sense. As I originally read it, I thought you
wanted a commit on /trunk/wc1 to trigger a change and commit made to
/trunk/wc2
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Mar 1 19:20:25 2007