Use the real file if there's no pristine directory available.
Mon Oct 3 04:47:34 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
* Use the real file if there's no pristine directory available.
{
hunk ./darcsweb.cgi 192
+def realpath(fname):
+ realf = filter_file(config.repodir + '/_darcs/current/' + fname)
+ if not os.path.exists(realf):
+ realf = filter_file(config.repodir + '/' + fname)
+ return realf
hunk ./darcsweb.cgi 198
+
hunk ./darcsweb.cgi 263
+| <a href="%(myreponame)s;a=tree">tree</a>
hunk ./darcsweb.cgi 266
- 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
-
hunk ./darcsweb.cgi 273
- realf = filter_file(config.repodir + '/_darcs/current/' + f)
+ realf = realpath(f)
hunk ./darcsweb.cgi 968
- f = open(config.repodir + '/_darcs/current/' + fname, 'r')
+ f = open(realpath(fname), 'r')
hunk ./darcsweb.cgi 1467
- realpath = config.repodir + '/_darcs/current/' + dname + '/'
+ path = realpath(dname)
+
hunk ./darcsweb.cgi 1470
- files = os.listdir(realpath)
+ files = os.listdir(path)
hunk ./darcsweb.cgi 1477
- realfile = realpath + f
+ if f == "_darcs":
+ continue
+ realfile = path + f
hunk ./darcsweb.cgi 1492
- realfile = realpath + f
+ realfile = path + f
hunk ./darcsweb.cgi 1552
- f = open(config.repodir + '/_darcs/current/' + fname, 'r')
+ f = open(realpath(fname), 'r')
}