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

Re: subversion transactions

From: David Weintraub <qazwart_at_gmail.com>
Date: 2005-07-01 19:39:21 CEST

On 6/30/05, Bosnjak Zoran ITWEP <Bosnjak@iskratel.si> wrote:
> I am now trying to do code review via branches and I have already implemented simple pre-commit script that will check if all modified files are reviewed and are OK. This works for now... except it requires a lot of manual branch manipulation.
> Could I automate the procedure inside pre-commit stript:
> - if all files are reviewed with success, accept commit
> - if any file is rejected, cancle commit
> - if any file is not yet reviewed:
> - the pre-commit script should make a branch automaticly (from HEAD of curent branch)
> - the pre-commit script should apply the transaction to new branch instead (not to curent branch)
> - send e-mail to the reviewer with new branch information

How can you tell if the code has been reviewed? Is this done via a
property to be set on the file or directory?

You should lock down the trunk of your tree except for your team and
maybe trusted team leads. No one can put files on the trunk except for
you and these trusted agents. After a successful code review, you can
copy the files from the branch to the trunk. This could be done via a
client script. "svn copy" doesn't need a working directory checked
out, so the operation is pretty simple, and can easily be done in a

BTW, it is possible (although very difficult) to do what you want, but
it would take a second transaction to do this. And, it would leave the
developer's machine in an out-of -snyc with the state of the source
archive. It is not recommended to modify a commit transaction during a

> Thanks,
> Zoran Bosnjak
> > -----Original Message-----
> > From: Ben Collins-Sussman [mailto:sussman@collab.net]
> > Sent: Thursday, June 23, 2005 6:50 PM
> > To: Bosnjak Zoran ITWEP
> > Cc: users@subversion.tigris.org
> > Subject: Re: subversion transactions
> >
> >
> >
> > On Jun 23, 2005, at 8:32 AM, Bosnjak Zoran ITWEP wrote:
> > >
> > > Please confirm if this scenario is possible
> >
> > No, it's not possible using existing svn binaries and tools,
> > nor will
> > scripting help. When I said that the "foundation is laid", I merely
> > meant that the *APIs* already exist which could allow the things you
> > describe to happen. But you'd have to write your own custom clients
> > and tools to make use of such APIs.
> >
> > That said, there's no need to undertake such a huge project.
> > You can
> > accomplish the same effect just using branches. Have each user
> > commit changes to a private branch, and then have others review and
> > comment on it in the branch. (Anybody can 'svn switch' their
> > working
> > copy to any branch, back and forth.) When everything is all
> > approved,
> > then merge the branch to /trunk.
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

David Weintraub
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 1 20:00:13 2005

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.