Tue Aug 23 23:16:47 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
* Add "darcspath" to the config file.
This patch adds an optional "darcspath" parameter to the configuration,
allowing people with darcs in non-standard locations to specify it by simply
editing the config file.
Thanks to ale@bomberstudios.com who sent a patch to do this (although I did it
in a slightly different way).
diff -rN -u old-darcsweb/config.py.sample new-darcsweb/config.py.sample
--- old-darcsweb/config.py.sample 2015-04-15 14:36:34.000000000 +0000
+++ new-darcsweb/config.py.sample 2015-04-15 14:36:34.000000000 +0000
@@ -16,6 +16,11 @@
# the CSS file to use
cssfile = 'style.css'
+ # optionally, you can specify the path to the darcs executable; if you
+ # leave this commented, the one on $PATH will be used (this is
+ # normally what you want)
+ #darcspath = "/home/me/bin/darcs"
+
#
# From now on, every class is a repo configuration, with the same format
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2015-04-15 14:36:34.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2015-04-15 14:36:34.000000000 +0000
@@ -341,7 +341,7 @@
"""Runs darcs on the repodir with the given params, return a file
object with its output."""
os.chdir(config.repodir)
- cmd = "darcs " + params
+ cmd = config.darcspath + "darcs " + params
inf, outf = os.popen4(cmd, 'r')
return outf
@@ -1330,6 +1330,12 @@
config.repourl = c.repourl
config.repoencoding = c.repoencoding
+ # optional parameters
+ if "darcspath" in dir(base):
+ config.darcspath = base.darcspath + '/'
+ else:
+ config.darcspath = ""
+
#
# main