How do I know if my working copy is out of sync

We save the image of the current release code in some local directory and to create the code we use the code in this directory. In the build script, I need a way to find out if the code in the image directory is synchronized with the current release branch in the repository. If so, I will do an svn update from the script. Can revision numbers be used to detect synchronization status in some way? If so, how?

Vadiraj

+4
source share
1 answer
svn status -u 

Adds operational revision and outdated server information.

If you do not have files without versions in the directory, then it is updated only if the status command returns nothing. Otherwise, * means it is not being updated ,? means non-version, M - modified, etc.

In other words, this is relevant if and only if the following returns 0:

 svn status -u | grep -E -c "^\s+[^\?]" 
+10
source

All Articles