0

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?

2 Answers 2

2

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'
Sign up to request clarification or add additional context in comments.

3 Comments

Okay I'm not sure if I understand correctly. Currently, my script is executed at the root of my server, the same way I executed the svn checkout script.
@OlivierParenteau in your script, before you try to run the svn update, just run this just to confirm where the script is where you thinks it is executing from echo __DIR__; Then on the command line, take the directory, and try this svn info <directorypath> and see if you get the working copy details.
I tried that and I do get the working copy details. I thought I might have been using the wrong URL for the svn but using the path, url or repository root displayed in those informations doesn't work.
1

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");

1 Comment

Unfortunately, I cannot use this method. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.