0

I am automating a process where i need to add/remove some files from a SVN repository. However the script fails when i try to commit the changes. Some info about my SVN version & the error message that i am receiving is -

$ svn --version
svn, version 1.6.11 (r934486)
compiled May 31 2011, 06:01:42

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme

$

The error that i receive is -

svn: '<working directory>/all' is not under version control

I do not have a file (or) directory called "all" in the folder. I have tried using the following command as well -

svn commit --targets $changelistFile -m $commitMessage

where $changelistFile contains all the files that need to be acted upon. They contain both adds & deletes. I still get the same error. If i run the "svn commit" command from the bash shell (after my script has failed) it is successful, however from within the script it fails.

The bash code snippet is -

if [[ $numAdded -gt 0 ]] || [[ $numRemoved -gt 0 ]]; then
            svn commit --targets $changelistFile -m $commitMessage
fi

Any help in resolving this issue would be very helpful.

update --

The file "$changelistFile" does not contain all . The contents of the file is

data/2015_10_05_yyyyy_data.cql
test_consolidated_scripts/test_20151007.cql

I tried the command

svn commit --targets "$changelistFile" -m $commitMessage

and it didn't help either.

2
  • 1
    It's slightly off-topic, but Subversion 1.6.x is not supported for two years since Subversion 1.8.0 release: subversion.apache.org/docs/release-notes/1.8.html Commented Oct 7, 2015 at 20:10
  • yea, unfortunately that's the version that's installed on our servers. I could setup my own local subversion but haven't done that yet. Commented Oct 7, 2015 at 20:18

1 Answer 1

3

Does $commitMessage happen to contain the word "all"? The file and message should be quoted in case they contain whitespace.

svn commit --targets "$changelistFile" -m "$commitMessage"
Sign up to request clarification or add additional context in comments.

2 Comments

added the info you had requested as an update to my original post itself. Thought it would be useful additional to the original post itself.
Actually i solved the problem. Thanks for the tip john. I had to add "" to my $commitMessage. I misread your suggestion as i was blind :-). It solved the issue & i am accepting your suggestion as my answer.

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.