You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by James O'Reilly <ja...@synergymedia.net> on 2008/07/31 17:35:52 UTC

post-commit help please

Hi everyone, new to the list.  I've been banging my head against the 
wall for the last couple of days on a Windows post-script I'm trying to 
write and I'm not getting anywhere with it.  Maybe someone on the list 
will be kind enough to help me.


Quick explaination...
---------------------------------
I have 4 developers working off local working copies of a website, each 
updating and committing revisions to a repository I set up on the 
network.  The developers are working in VisualStudio 2008 with the 
VisualSVN plugin and no problems.


What I have working...
---------------------------------
I have a super simple post-commit script that updates a 5th working copy 
of the repo on the internal development webserver which is what I have 
IIS using as a webroot folder.  When a developer commits, the webroot 
gets the update and they can test their changes.

My post-commit.bat file:
C:\Progra~1\Visual~1\bin\svn update 
"\\ServerName\clients\ClientName\wwwroot"


My problem...
---------------------------------
Because we're using a few frameworks the site we are building contains 
roughly 2200 files.  So when we do a commit, the post-commit script 
takes a short while to run updating the webroot.  This is a bit annoying 
for the developers.


My solution attempt...
---------------------------------
I read about SVNLOOK and figured it might hold some power to reduce the 
update to only be the changes commited. I failed miserably at 
implementing it because of my lack of batch file syntax.


Questions...
---------------------------------
1. Is there an easier way to do what I'm doing or am I on the right 
track?  It does seem to work, albeit slow.

2. Can someone write me a post-commit.bat file that does what I'm trying 
to do?  I'm looking for a script that is a BAT file.  I can install grep 
if needed for the SVNLOOK.


Thanks in advance,
James




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: post-commit help please

Posted by Andy Levy <an...@gmail.com>.
On Thu, Jul 31, 2008 at 13:35, James O'Reilly
<ja...@synergymedia.net> wrote:
> Hi everyone, new to the list.  I've been banging my head against the wall
> for the last couple of days on a Windows post-script I'm trying to write and
> I'm not getting anywhere with it.  Maybe someone on the list will be kind
> enough to help me.
>
>
> Quick explaination...
> ---------------------------------
> I have 4 developers working off local working copies of a website, each
> updating and committing revisions to a repository I set up on the network.
>  The developers are working in VisualStudio 2008 with the VisualSVN plugin
> and no problems.
>
>
> What I have working...
> ---------------------------------
> I have a super simple post-commit script that updates a 5th working copy of
> the repo on the internal development webserver which is what I have IIS
> using as a webroot folder.  When a developer commits, the webroot gets the
> update and they can test their changes.
>
> My post-commit.bat file:
> C:\Progra~1\Visual~1\bin\svn update
> "\\ServerName\clients\ClientName\wwwroot"
>
>
> My problem...
> ---------------------------------
> Because we're using a few frameworks the site we are building contains
> roughly 2200 files.  So when we do a commit, the post-commit script takes a
> short while to run updating the webroot.  This is a bit annoying for the
> developers.
>
>
> My solution attempt...
> ---------------------------------
> I read about SVNLOOK and figured it might hold some power to reduce the
> update to only be the changes commited. I failed miserably at implementing
> it because of my lack of batch file syntax.

svn update only transmits the differences between the WC and the
repository. So there's not much to be gained here.

>
> Questions...
> ---------------------------------
> 1. Is there an easier way to do what I'm doing or am I on the right track?
>  It does seem to work, albeit slow.

You are on the right track.

> 2. Can someone write me a post-commit.bat file that does what I'm trying to
> do?  I'm looking for a script that is a BAT file.  I can install grep if
> needed for the SVNLOOK.

Have your post-commit spawn a new process to run the svn update. You
will lose the ability for the commiter to know whether the update
succeeded or not, but you can exit the post-commit script immediately
and free up the client.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: post-commit help please

Posted by John Peacock <jo...@havurah-software.org>.
James O'Reilly wrote:
> Yeah, the developers were tired of manually copying files into the 
> webroot every time they wanted to test their changes.  I'm sure there is 
> a way to have a script run so that it exports a clean (without _svn 
> folders) copy to the webroot but that's beyond my understanding of 
> subversion at this time.

If you weren't running Windows, I could recommend SVN::Notify::Mirror as a way 
to keep a website in sync (specifically the Rsync method).  It's a Perl module I 
wrote specifically to update a corporate webserver (actually running Windows), 
but making up for the almost total lack of useful tools on Windows, I can't 
recommend it to the uninitiated.

If you are curious, you can search the message archive for my earlier attempts 
to help people get it running.  It isn't impossible, just kind of hard for 
Windows to manage...

John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: post-commit help please

Posted by James O'Reilly <ja...@synergymedia.net>.
Yeah, the developers were tired of manually copying files into the 
webroot every time they wanted to test their changes.  I'm sure there is 
a way to have a script run so that it exports a clean (without _svn 
folders) copy to the webroot but that's beyond my understanding of 
subversion at this time.

I think it's preferred to see the script end so that the developers know 
when to start testing in the browser, meaning all the files finished 
updating.

One side affect we haven't gotten around yet, is IIS recycles it's 
process after a commit.  This sucks because testing an app already in 
session kills the web session and you have to start over with  your 
testing from the login.  We were sure to exclude the "bin" folder so I'm 
not sure what it recycles.  I thought maybe the global.aspx page was 
being touched but if an svn update really only touches the files that 
were changed this shouldn't be it.  Maybe I'll try excluding global.aspx 
and see what happens.

On a side note, we excluded all of the extra framework library files 
(files that will never be edited by us) from the repository which 
significantly reduced the number of files that the repository was 
versioning which sped up the post-commit from a short while to a few 
seconds which is certainly usable.

James


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org