0

I have programmed a customized deployment routine in .NET which does the following:

  1. Performs some previous checks on my code (among other things). This code is placed in a local folder.
  2. If all tests are OK it will then transfer this code to the production server.

Now, my question is: as a "previous check", I would like to test if my local folder contains the latest update from my Tortoise SVN repository. Is there any info in the .svn folders to check if an update is needed, or any other way to do so?

1 Answer 1

1

Is there any info in the .svn folders to check if an update is needed

No

or any other way to do so?

Yes.

You have to use svn status -u ("show updates") from your app (if you have CLI svn-client) and check output.

From svn help status

   The out-of-date information appears in the ninth column (with -u):
      '*' a newer revision exists on the server
      ' ' the working copy is up to date

Sample:

>svn status -u wc
 M             965   wc/bar.c
        *      965   wc/foo.c
A  +             -   wc/qax.c
Status against revision:   981

wc/bar.c contains local modifications wc/foo.c updated in repository wc/qax.c added locally and sheduled for commit

in case of none local changes and repository changes

>svn status -u
Status against revision:     37

You will not get file-list, only status-line

Sign up to request clarification or add additional context in comments.

2 Comments

Than you very much for the hint. So now I have read have read about these functionalities here. Then I decided that a good option was to test through errorCodes what is the state of my local folder: process.Start() process.WaitForExit() Return process.ExitCode The thing is that with this method I can know if a commit is necessary (with cmd="my_folder -n"), but not if an update is necessary... Furthermore, I can not find any "-u" option in the documentation.
OK, I gathered more information and now I see what I was missing. The first and more important piece is this (answer by AnneTheAgile): in tortoise, "command line client tools" is not installed by default. After installing them you can use svn.exe. So now your suggestion (svn status -u) works like a charm, 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.