Mon Jul 25 04:41:00 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
* Skip showing the tree link if there is no pristine tree.
If the repository was get with the --no-pristine-tree option, there won't be a
current directory; we only show the tree option if the directory is there.
The other related option that accesses the pristine tree directly is the
headblob, but there is already a check in place that takes care of it.
Thanks to Stephane Popinet for reporting it.
{
hunk ./darcsweb.cgi 248
-| <a href="%(myreponame)s;a=tree">tree</a>
hunk ./darcsweb.cgi 249
+
+ if os.path.isdir(config.repodir + '/_darcs/current/'):
+ # the current directory is missing if the --no-pristine-tree
+ # option was used in darcs get, so we only show the link if
+ # the directory exists
+ print '| <a href="%s;a=tree">tree</a>' % config.myreponame
}