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

How can I parse the output of "svn update"?

From: Daevid Vincent <daevid_at_daevid.com>
Date: Fri, 8 Aug 2008 14:21:45 -0700

Can someone show me a good way to parse the output of "svn update" via a
script (bash or php)? Or does anyone have a script that does something like
this already?

 

There's a lot of files whizzing by and it's not always easy to spot if there
is an update.sql file listed. I want to append a comment to the screen that
says "Hey, don't forget to run the update.sql commands or your database will
be whack." It would also be nice if I could change the color (via ANSI
escape sequences) for that line too.

 

I'm thinking something like this:

 

dev_at_devbox ~ $ svnu

U site/batch/index_user.php

U site/apps/frontend/lib/myLoginValidator.class.php

U site/apps/frontend/modules/sidebar/templates/_signin.php

U site/apps/frontend/modules/content/actions/actions.class.php

U site/apps/frontend/modules/content/config/view.yml

U site/apps/frontend/templates/layout.php

U site/data/sql/update.sql

U site/apps/frontend/modules/foo/config/bar.yml

U site/apps/frontend/modules/foo/bar.php

 

########################################################

   DON'T FORGET TO RUN THE site/data/sql/update.sql

########################################################

 

We're already in the habit of typing "svnu" as an alias to "svn update", so
I figure I can just re-use that name J.
Received on 2008-08-08 23:23:17 CEST

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.