Fix annotate so it works with darcs 2
Sun Aug 3 15:02:56 UTC 2008 Alberto Bertogli <albertito@gmail.com>
* Fix annotate so it works with darcs 2
darcs 2 doesn't like files beginning with / as parameters for annotate. Since
darcs 1 doesn't care, remove the '/' before running darcs.
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2013-07-18 20:19:53.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2013-07-18 20:19:54.000000000 +0000
@@ -1053,6 +1053,11 @@
cmd = 'annotate --xml-output'
if hash:
cmd += ' --match="hash %s"' % hash
+
+ if fname.startswith('/'):
+ # darcs 2 doesn't like files starting with /, and darcs 1
+ # doesn't really care
+ fname = fname[1:]
cmd += ' "%s"' % fname
if not config.disable_annotate:
out = run_darcs(cmd)