[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Using svn with cron?

From: Tony Sweeney <tsweeney_at_omnifone.com>
Date: Mon, 7 Mar 2011 13:03:39 -0000

 

> -----Original Message-----
> From: Nico Kadel-Garcia [mailto:nkadel_at_gmail.com]
> Sent: 07 March 2011 12:57
> To: Ole Pinto
> Cc: bimininavels; users_at_subversion.apache.org
> Subject: Re: Using svn with cron?
>
> On Mon, Mar 7, 2011 at 3:24 AM, Ole Pinto <olepinto_at_gmail.com> wrote:
> > As you are scheduling your job to run with your user, I
> don't think it
> > is a permissions related problem. But maybe the env. vars
> do matter,
> > including any needed to get to your stored password.
> >
> > Once you get to stderr you'll probably have a clue about
> what is happening.
> > If not, from your perl script print the environment vars, and
> > reproduce that in an interactive shell. If it doesn't work,
> there you
> > have it. Now you would only need to compare this to a
> "normal" shell,
> > and make small modifications until you make it work.
> >
> > On Sun, Mar 6, 2011 at 20:45, bimininavels <cl_at_qgenuity.com> wrote:
> >>
> >> I've been struggling all morning with what should be a very simple
> >> problem.
> >>
> >> I would like to commit and update a svn repository daily
> using cron.
> >> I've encapsulated my svn calls into a perl script, which runs the
> >> following
> >>
> >> ----
> >> #!/usr/bin/perl
> >>
> >> print "To run svn commit\n";
> >> $thetime=time;
> >>
> >> system "cd ~/docs; /usr/bin/svn commit --message '$thetime' \n";
> >> system "cd ~/docs; /usr/bin/svn info \n";
>
> Hello. Is that "$thetime" getting parsed?
>
> Look, for 3 lines of code, you don't need perl.
>
> #!/bin/sh
> cd ~/docs || exit 1
> /usr/bin/svn commit --message "`date`"
> /usr/bin/svn info
>
> Done. Note the exit if the "cd" fails, and set whatever
> "date" format you want.

That isn't valid Bourne shell; tilde expansion is a C shell feature that
has found its way into Bash. Either invoke Bash explicitly or use $HOME
where you have the tilde.

Tony.

>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit
> http://www.messagelabs.com/email
> ______________________________________________________________________
>
Received on 2011-03-07 14:04:15 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.