0

I have the following bash script, which is run every 15 minutes by cron. The idea is that it will add any new files to the repo, then commit all changes:

#! /bin/sh

# Add any new files found in /wc
svn add /wc --force

# Commit all changes to repository
svn commit /wc -m "Auto commit"

The svn add command is throwing an error:

svn: '/' is not a working copy

What am I doing wrong?

Running svn add /wc --force from command line throws the same error.

3
  • It should work, if /wc is a working copy. It is, isn't it? Commented Apr 13, 2012 at 16:16
  • Yes - wc stands for working copy. Commented Apr 13, 2012 at 16:40
  • Yeah, and, what does svn info /wc print? Commented Apr 13, 2012 at 16:41

2 Answers 2

2

as I tested a second ago, that should work:

svn add --depth=infinity --force /wc/*

I assume /wc is your working copy of the svn repo.

edit: actually you just need to add /* probably, I think -depth=infinity is set by default.

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

Comments

1

Change into the directory (inside the bash script) before running the SVN commands, just with a

cd /wc

inside your script.

2 Comments

Why would you need this if you provide absolute paths? How will it help?
It does work, as you changed the working directory on which the command is run, but I don't understand why using an absolute path doesn't work either!

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.