简体   繁体   中英

Svn update script skips the svn

I'm trying to create a script that will execute a svn update on the root but I don't understand the results I'm getting. Here is the code executed by my script:

$update = "svn --username user --password pwd update svn://URL";
$res = exec($update);
echo $res;

However, the echo of the $res gives me " Skipped 'svn://URL' ".

I've used a similar method to do a svn checkout and it worked fine. Is there something I'm missing to be able to do the update?

Make sure you're inside a Working copy. If the script runs in a non-SVN directory, you'll get this error:

  Skipped '/non/workingcopy/path'

Probably your script is running outside the working copy. Anyway... if you are developing under *NIX environment, you can also try this approach:

$result = shell_exec("/usr/bin/svn update /path/to/project --username user --password pass");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM