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

atomic svnsync

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: Thu, 17 Jan 2008 20:50:52 +0900 (JST)

Hi,

Goal: I want to use my local commit-email.rb (in post-commit
hook) for external Subversion repository. I only have read
only permission for the external repository. Or I want to
set up commit-email.rb only for me.

Strategy:
  * svnadmin create /.../repos
  * vim /.../repos/hooks/pre-revprop-change
  * vim /.../repos/hooks/post-commit # set up commit-email.rb
  * svnsync init file:///.../repos http://.../repos
  * svnsync sync # commit mail is sent for each commit

Problem: svnsync needs 2 processes to synchronize
repositories. They are (1) synchronizing changes and
properties except revision properties and (2) synchronizing
revision properties. post-commit hook is invoked on (1) and
commit-email.rb is also invoked. But some important
information, author, log message and so on, aren't
synchronized at this time yet. They are synchronized on (2).

I can't use post-revprop-change for this propose because
post-revprop-change hook may be called one or more times for
each commit. (e.g. for author revision property, log
revision property and so on.)

Solution idea: I can use post-commit hook like a usual
repository if svnsync just needs a process to synchronize
repository. In 1.5 API, we have svn_ra_get_commit_editor3()
that accepts revision properties. But FS layer don't use
passed some revision properties, date and author. We may be
able to decide whether we use those revision properties or
not with hook mechanism. I don't have a good name idea but
what about pre-commit-revprop hook?

Thanks,

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-01-17 12:51:08 CET

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

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