Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out if 'svn up' finished successfully?

Tags:

svn

I run sudo svn --username radek update ".$codebase." --force"; from my php script (on SuSE) every night before automation testing starts. So the testing is done on the latest code that was checked in today.

How can I for sure know that svn up finished successfully? So in case it wasn't the testing is not triggered?

like image 431
Radek Avatar asked Dec 17 '22 02:12

Radek


1 Answers

svn update should return a non-zero value if there were any failures (e.g. network error/disk error)

However an additional consideration is merge conflicts. svn update considers as "success" updating the working copy with merge conflicts.

Therefore, it may be important for you to also run svn status -q and look for files with "C" status, depending on your application--I'm assuming you want to take a different action if the update completes with conflicts.

like image 198
William Leara Avatar answered Dec 29 '22 23:12

William Leara