Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hey guys, I have two servers. One of them has a svn server running and another hosting projects.

I have a daily cronjob updating the projects -- ie running svn update, rebuild etc.

Now, my cronjob on the remote server works. However, a similar cronjob running on the local server for local projects (ie the same server as svn) is instead displaying a "svn: not working copy".

I double checked the paths, permissions and user info and if the script is launched manually, it works fine. Deploying the same thing remotely works.

I even tried using file:/// (suggested here http://www.hightekhosting.com.au/myaccount/knowledgebase/90/Using-SubversionorSVN-on-cPanel-Servers.html) but still nothing.

Please advise,

Thanks,

-hbt

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

It sounds like an environment difference between your local shell and the environment created by the cronjob.

Create this script in /tmp/env-test:

#!/bin/bash

env
echo $PATH
type -a svn
cd /path/to/local/workarea
svn info

Make it executable, run it manually then put it into cron with its output saved:

1  11  *  *  *  /tmp/env-test 2>1 >/tmp/cron-env

Compare the output of the local run and the cron version.

My hunch is that there's something different in your PATH.

share|improve this answer
    
Thank you! I exported the path to my cronjob and it worked. –  hbt Aug 3 '10 at 16:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.