mercurial and automatic backup via crontab hg: command not found

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mercurial and automatic backup via crontab hg: command not found

Maiken Pedersen
Dear mercurial-knowers,

I am rather new to mercurial, but find it very nice to use! However, I
have not succeeded in setting up automatic backup via a cronjob. I am
trying to do this on a redhat linux distribution, and placed the
mercurial commands in a .sh file that the crontab calls.

Running the crontab gives me

hg: command not found.

I have tried various tips suggested here:
http://mercurial.selenic.com/wiki/FAQ

I see there already is a soft-link in my /local/bin folder to hg - this
should be in my ssh PATH - since I checked via
ssh username@server env
and found /local/bin in the PATH

I also tried to place
remotecmd=/fullpath/to/bin/hg
in my .hgrc file

And finally I tried to add the full path in my .sh file that the crontab
executes like this
hg --config ui.remotecmd=/fullpath/to/mercurial....../bin/hg   (then the
commnad I want executed)

However, I still get the message

hg: command not found


I might have misunderstood what path should be included? Or possibly
something else.

Help much appreciated!

Thanks,
Maiken


_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: mercurial and automatic backup via crontab hg: command not found

Matt Mackall
On Sun, Jan 08, 2012 at 07:06:36PM +0100, Maiken Pedersen wrote:

> Dear mercurial-knowers,
>
> I am rather new to mercurial, but find it very nice to use! However,
> I have not succeeded in setting up automatic backup via a cronjob. I
> am trying to do this on a redhat linux distribution, and placed the
> mercurial commands in a .sh file that the crontab calls.
>
> Running the crontab gives me
>
> hg: command not found.

This is nothing specific to Mercurial. Change your crontab entry to:

echo $PATH; which hg

and the mystery should be quickly resolved. I have a PATH= line at the
top of my own crontab.

--
Mathematics is the supreme nostalgia of our time.
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial