Support the new pristine directory.
Sat May 13 23:23:21 UTC 2006 Alberto Bertogli <albertogli@telpin.com.ar>
* Support the new pristine directory.
darcs 1.0.7 uses a new name for the pristine directory, "pristine", instead of
the classic "current".
This patch adds support for that directory, without dropping "current" because
it's still heavily used in existing repositories.
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2015-10-31 21:49:32.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2015-10-31 21:49:32.000000000 +0000
@@ -218,9 +218,13 @@
return 0
def realpath(fname):
+ realf = filter_file(config.repodir + '/_darcs/pristine/' + fname)
+ if os.path.exists(realf):
+ return realf
realf = filter_file(config.repodir + '/_darcs/current/' + fname)
- if not os.path.exists(realf):
- realf = filter_file(config.repodir + '/' + fname)
+ if os.path.exists(realf):
+ return realf
+ realf = filter_file(config.repodir + '/' + fname)
return realf
def log_times(cache_hit, repo = None, event = None):