[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Is it possible to synchronize unpacked sources with its binary container?

From: Jim Sokoloff <jim_at_sokoloff.com>
Date: 2007-05-22 12:34:06 CEST

On Tue, 22 May 2007, Richard Bos wrote:

> On Mon, May 21, 2007 at 06:14:18PM -0400, Jim Sokoloff wrote:
>> You could get the behavior you want with a post-commit
>> hook (that would have to handle the case of content.xml
>> already existing, the delete of an odt file, etc)
>
> Would this method still keep the same user assigned to the
> modification? I don't think as the post-commit script is
> executed on the server by the user that owns the svn server
> process. I would like to keep the person that modifies
> the document, for annotation....

Change the revprop as part of the process. (Ryan has
already detailed how on this thread.)

>> We have several external processes that are triggered
>> as the result of commits (builds for specific branches,
>> updates of shared development webservers, etc). This
>> would be just another type of thing, and something for
>> which the post-commit hook would work well for.
>
> So the post-commit hook set a flag, after which a cronjob
> sees the flag and does its thing? Or do you do it a
> different way?

We're on Windows, so the exact mechanism is not cron,
but that's precisely the idea. We extract some of the
commit data using svnlook in a post-commit into an
MS-SQL DB, as well as writing marker files for non-DB
enabled apps. Then other processes either poll the DB,
wake up via scheduled tasks (windows ~crontab), or use
the marker files for synchronization.

>> (Note that you'd get TWO revision numbers, one for the
>> odt and one for the .xml checkin. Don't try to modify
>> the transaction from the post-commit-hook; you are too
>> late. But, if they happen one right after the other, I
>> doubt you care.)
>
> See above, I want to keep the author's name unchanged.

You can edit the revision history so that's the case
(for all but a fraction of a second). Ryan has the
recipe on thread.

>> As for the post-commit email, obviously you could change
>> the post-commit hook to send the content.xml diff in one
>> email if you wanted.
>
> I use svnnotify and I want to keep on using this....

Then use two commits, and the second commit mail will
automatically do this. You'll have to check on the
timing with the revprop change for what user
svnnotify will say made the change. If that tool is
synchronous in a post-commit hook, it may report the
shared user as the committer still. (In this case,
change the committer revprop in the post-commit hook
of the second commit, parsing the "real" user out of
the commit string or something, before running
svnnotify.) I'm not familiar with that tool.

--Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 22 12:34:26 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.