diff -Nru loggerhead-1.19~bzr511/byov.conf loggerhead-2.0.1+bzr541+ds/byov.conf
--- loggerhead-1.19~bzr511/byov.conf 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/byov.conf 2022-09-21 12:13:25.749000000 +0000
@@ -6,12 +6,11 @@
dulwich.clone = (git clone git://jelmer.uk/dulwich ../dulwich.git)
dulwich.install = (cd ../dulwich.git && ./setup.py install --user)
dulwich3.install = (cd ../dulwich.git && python3 ./setup.py install --user)
-simpletal3.install = pip3 install http://www.owlfish.com/software/simpleTAL/downloads/SimpleTAL-5.2.tar.gz
[loggerhead]
vm.release = xenial
brz.build_deps = gcc, debhelper, python, python-all-dev, python3-all-dev, python-configobj, python3-configobj, python-docutils, python3-docutils, python-paramiko, python3-paramiko, python-subunit, python3-subunit, python-testtools, python3-testtools, subunit, cython, cython3, python-fastimport, python-dulwich, python-six, python3-six
-loggerhead.build_deps = python-setuptools, python3-setuptools, libjs-jquery, python-docutils, python3-docutils, python-pygments, python3-pygments, python-paste, python3-paste, python-pastedeploy, python3-pastedeploy, python-simpletal, python-bleach, python3-bleach
+loggerhead.build_deps = python-setuptools, python3-setuptools, libjs-jquery, python-docutils, python3-docutils, python-pygments, python3-pygments, python-paste, python3-paste, python-pastedeploy, python3-pastedeploy, python-chameleon, python3-chameleon, python-bleach, python3-bleach
loggerhead.test_deps = python3-fixtures, python-fixtures
vm.packages = {brz.build_deps}, {loggerhead.build_deps}, {loggerhead.test_deps}, bzr, python-junitxml, python3-pip
brz.branch = (bzr branch lp:brz ../brz-trunk)
@@ -19,5 +18,5 @@
byoci.setup.command = ({dulwich.clone} && {dulwich.install} && {brz.branch} && {brz.make})
byoci.tests.command = bash -o pipefail -c "bzr log -l2 && (BRZ_PLUGINS_AT=loggerhead@`pwd` BRZ_PLUGIN_PATH=-site:-user python2 ../brz-trunk/brz selftest -v --parallel=fork --subunit2 | subunit2junitxml -o ../results.xml -f | subunit2pyunit)"
[loggerhead-py3]
-byoci.setup.command = ({dulwich.clone} && {dulwich3.install} && {brz.branch} && {brz.make} && {simpletal3.install})
+byoci.setup.command = ({dulwich.clone} && {dulwich3.install} && {brz.branch} && {brz.make})
byoci.tests.command = bash -o pipefail -c "bzr log -l2 && (BRZ_PLUGINS_AT=loggerhead@`pwd` BRZ_PLUGIN_PATH=-site:-user python3 ../brz-trunk/brz selftest -v --parallel=fork --subunit2 | subunit2junitxml -o ../results.xml -f | subunit2pyunit)"
diff -Nru loggerhead-1.19~bzr511/debian/changelog loggerhead-2.0.1+bzr541+ds/debian/changelog
--- loggerhead-1.19~bzr511/debian/changelog 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/changelog 2022-10-23 09:31:16.000000000 +0000
@@ -1,3 +1,46 @@
+loggerhead (2.0.1+bzr541+ds-2) unstable; urgency=medium
+
+ * Drop running no longer installed testsuite in debian/tests/control.
+ Closes: #1016452
+
+ -- Jelmer Vernooij Sun, 23 Oct 2022 10:31:16 +0100
+
+loggerhead (2.0.1+bzr541+ds-1) unstable; urgency=medium
+
+ * Remove incorrect field Homepage from debian/upstream/metadata.
+ * Update standards version to 4.6.1, no changes needed.
+ * Update watch file format version to 4.
+ * d/t/control: Add missing dependency on python-pygments. Closes:
+ #1022140
+ * New upstream snapshot.
+ + Fixes compatibility with newer versions of Breezy.
+
+ -- Jelmer Vernooij Fri, 21 Oct 2022 00:11:09 +0100
+
+loggerhead (2.0.0-2) unstable; urgency=medium
+
+ * Run tests from source since they are no longer installed. Closes:
+ #1019509
+
+ -- Jelmer Vernooij Sun, 11 Sep 2022 02:05:36 +0100
+
+loggerhead (2.0.0-1) unstable; urgency=medium
+
+ * Drop dependency on simpletal, move to chameleon.
+ * New upstream release.
+ + Fixes FTBFS. Closes: #1016452
+ * Bump debhelper from old 12 to 13.
+ * Update standards version to 4.6.0, no changes needed.
+
+ -- Jelmer Vernooij Sun, 21 Aug 2022 14:38:51 +0100
+
+loggerhead (1.19~bzr524-1) unstable; urgency=low
+
+ * Remove obsolete link for yui. Closes: #988860
+ * New upstream snapshot.
+
+ -- Jelmer Vernooij Mon, 11 Jul 2022 15:23:56 +0100
+
loggerhead (1.19~bzr511-1) unstable; urgency=medium
* New upstream snapshot.
diff -Nru loggerhead-1.19~bzr511/debian/control loggerhead-2.0.1+bzr541+ds/debian/control
--- loggerhead-1.19~bzr511/debian/control 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/control 2022-10-23 09:31:16.000000000 +0000
@@ -7,7 +7,7 @@
Andrew Starr-Bochicchio ,
Jelmer Vernooij
Homepage: https://launchpad.net/loggerhead
-Build-Depends-Indep: brz (>= 3.0.0~), python3-breezy.tests, python3-fixtures, python3-sphinx, python3-subunit, python3-testtools, python3-setuptools, python3-bleach
+Build-Depends-Indep: brz (>= 3.0.0~), python3-breezy.tests, python3-fixtures, python3-sphinx, python3-subunit, python3-testtools, python3-setuptools, python3-bleach, python3-chameleon
Build-Depends: python3-all,
python3-dulwich,
python3-paste (>= 1.6),
@@ -15,15 +15,15 @@
python3-simplejson,
python3-simpletal,
dh-python,
- debhelper-compat (= 12)
-Standards-Version: 4.5.0
+ debhelper-compat (= 13)
+Standards-Version: 4.6.1
Vcs-Bzr: https://code.launchpad.net/~debian-bazaar/debian/sid/loggerhead/unstable
Vcs-Browser: https://code.launchpad.net/~debian-bazaar/debian/sid/loggerhead/unstable
Rules-Requires-Root: no
Package: loggerhead
Architecture: all
-Depends: adduser, libjs-jquery, python3-breezy (>= 3.0.0~), python3-paste (>= 1.6), python3-pkg-resources, python3-simplejson, python3-simpletal, ${misc:Depends}, ${python3:Depends}, python3-bleach, python3-dulwich
+Depends: adduser, libjs-jquery, python3-breezy (>= 3.0.0~), python3-paste (>= 1.6), python3-pkg-resources, python3-simplejson, python3-chameleon, ${misc:Depends}, ${python3:Depends}, python3-bleach, python3-dulwich
Suggests: brz, loggerhead-breezy-doc, python3-pastedeploy (>= 1.3.0)
Enhances: brz
Recommends: python3-pygments
diff -Nru loggerhead-1.19~bzr511/debian/examples loggerhead-2.0.1+bzr541+ds/debian/examples
--- loggerhead-1.19~bzr511/debian/examples 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/examples 2022-10-23 09:31:16.000000000 +0000
@@ -1,3 +1,4 @@
debian/loggerhead-serve.conf.example
-breezy.conf
-apache-loggerhead.conf
+usr/share/doc/loggerhead/loggerheadd
+usr/share/doc/loggerhead/breezy.conf
+usr/share/doc/loggerhead/apache-loggerhead.conf
diff -Nru loggerhead-1.19~bzr511/debian/loggerhead.links loggerhead-2.0.1+bzr541+ds/debian/loggerhead.links
--- loggerhead-1.19~bzr511/debian/loggerhead.links 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/loggerhead.links 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-/usr/share/javascript/yui3 /usr/share/loggerhead/static/javascript/yui/build
\ No newline at end of file
diff -Nru loggerhead-1.19~bzr511/debian/patches/isalive.patch loggerhead-2.0.1+bzr541+ds/debian/patches/isalive.patch
--- loggerhead-1.19~bzr511/debian/patches/isalive.patch 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/patches/isalive.patch 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-=== modified file 'loggerhead/load_test.py'
---- old/loggerhead/load_test.py 2020-07-08 17:14:19 +0000
-+++ new/loggerhead/load_test.py 2020-11-25 21:25:35 +0000
-@@ -211,7 +211,7 @@
- # And join the controlling thread
- for i in range(10):
- t.join(self.blocking_timeout / 10.0)
-- if not t.isAlive():
-+ if not t.is_alive():
- break
-
- def _full_url(self, relpath):
-
diff -Nru loggerhead-1.19~bzr511/debian/patches/paths.patch loggerhead-2.0.1+bzr541+ds/debian/patches/paths.patch
--- loggerhead-1.19~bzr511/debian/patches/paths.patch 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/patches/paths.patch 1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-Index: unstable/setup.py
-===================================================================
---- unstable.orig/setup.py
-+++ unstable/setup.py
-@@ -44,6 +44,7 @@ setup(
- "loggerhead/controllers",
- "loggerhead/middleware",
- "loggerhead/templates",
-+ "loggerhead/tests",
- "breezy.plugins.loggerhead"],
- package_dir={'breezy.plugins.loggerhead':'.'},
- package_data = {"loggerhead": ["templates/*.pt",
diff -Nru loggerhead-1.19~bzr511/debian/patches/series loggerhead-2.0.1+bzr541+ds/debian/patches/series
--- loggerhead-1.19~bzr511/debian/patches/series 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/patches/series 2022-10-23 09:31:16.000000000 +0000
@@ -1,3 +1 @@
-paths.patch
static-path.patch
-isalive.patch
diff -Nru loggerhead-1.19~bzr511/debian/prerm loggerhead-2.0.1+bzr541+ds/debian/prerm
--- loggerhead-1.19~bzr511/debian/prerm 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/prerm 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-#!/bin/sh
-#DEBHELPER#
diff -Nru loggerhead-1.19~bzr511/debian/rules loggerhead-2.0.1+bzr541+ds/debian/rules
--- loggerhead-1.19~bzr511/debian/rules 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/rules 2022-10-23 09:31:16.000000000 +0000
@@ -1,13 +1,5 @@
#!/usr/bin/make -f
-PKD = $(abspath $(dir $(MAKEFILE_LIST)))
-PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
-UVER = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
-REV = $(shell echo $(VER) | perl -ne 'print "$$1" if m/(?:git|svn|hg|bzr)(\d+)/;')
-UURL = lp:loggerhead
-DTYPE = +dfsg
-VER ?= $(subst $(DTYPE),,$(UVER))
-
%:
dh $* --with python3 --buildsystem=pybuild
@@ -27,16 +19,4 @@
override_dh_auto_build:
dh_auto_build
- cd docs/ && $(MAKE) html
-
-$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
- $(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
- bzr export --revision=$(REV) $(PKG)-$(VER) $(UURL) \
- || $(RM) -r $(PKG)-$(VER)
- @echo "# Removing copy of YUI3..."
- cd $(PKG)-$(VER) \
- && $(RM) -r -v \
- loggerhead/static/javascript/yui
- @echo "# Packing..."
- XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" "$(PKG)-$(VER)" \
- && $(RM) -r "$(PKG)-$(VER)"
+ cd docs/ && PYTHONPATH=.. $(MAKE) html
diff -Nru loggerhead-1.19~bzr511/debian/tests/control loggerhead-2.0.1+bzr541+ds/debian/tests/control
--- loggerhead-1.19~bzr511/debian/tests/control 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/tests/control 1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-Tests: testsuite
-Depends: @, brz, python3-breezy.tests, python3-subunit
-Restrictions: allow-stderr
diff -Nru loggerhead-1.19~bzr511/debian/tests/testsuite loggerhead-2.0.1+bzr541+ds/debian/tests/testsuite
--- loggerhead-1.19~bzr511/debian/tests/testsuite 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/tests/testsuite 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-#!/bin/sh -e
-/usr/bin/brz selftest --parallel=fork -v -s bp.loggerhead
diff -Nru loggerhead-1.19~bzr511/debian/upstream/metadata loggerhead-2.0.1+bzr541+ds/debian/upstream/metadata
--- loggerhead-1.19~bzr511/debian/upstream/metadata 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/upstream/metadata 2022-10-23 09:31:16.000000000 +0000
@@ -2,4 +2,3 @@
Repository-Browse: https://code.launchpad.net/loggerhead
Bug-Database: https://bugs.launchpad.net/loggerhead
Bug-Submit: https://bugs.launchpad.net/loggerhead/+file-bug
-Homepage: https://launchpad.net/loggerhead
diff -Nru loggerhead-1.19~bzr511/debian/watch loggerhead-2.0.1+bzr541+ds/debian/watch
--- loggerhead-1.19~bzr511/debian/watch 2020-11-25 22:30:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/debian/watch 2022-10-23 09:31:16.000000000 +0000
@@ -1,3 +1,2 @@
-version=3
-opts=dversionmangle=s/\.dfsg// \
-https://launchpad.net/loggerhead/+download https://launchpad.net/loggerhead/.*/loggerhead-(.+).tar.gz
+version=4
+opts=dversionmangle=s/\.dfsg// https://launchpad.net/loggerhead/+download https://launchpad.net/loggerhead/.*/loggerhead-(.+).tar.gz
diff -Nru loggerhead-1.19~bzr511/Dockerfile loggerhead-2.0.1+bzr541+ds/Dockerfile
--- loggerhead-1.19~bzr511/Dockerfile 1970-01-01 00:00:00.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/Dockerfile 2022-09-21 12:13:25.749000000 +0000
@@ -0,0 +1,11 @@
+FROM debian:sid-slim
+
+# Simple docker file for loggerhead
+# To use, mount something on /code
+# Logs will be accessible at /logs
+
+RUN apt update && apt install --no-install-recommends -y python3 python3-bleach python3-paste python3-pip python3-patiencediff python3-chameleon python3-dev build-essential python3-pastedeploy python3-dulwich python3-certifi python3-configobj && pip3 install breezy && apt clean && mkdir -p /logs
+ADD . /opt/loggerhead
+ENV PYTHONPATH=/opt/loggerhead
+EXPOSE 8080/tcp
+ENTRYPOINT ["/usr/bin/python3", "/opt/loggerhead/loggerhead-serve", "/code", "--host=0.0.0.0", "--port=8080", "--log-folder=/logs", "--cache-dir=/tmp"]
diff -Nru loggerhead-1.19~bzr511/docs/conf.py loggerhead-2.0.1+bzr541+ds/docs/conf.py
--- loggerhead-1.19~bzr511/docs/conf.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/docs/conf.py 2022-09-21 12:13:25.749000000 +0000
@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+from loggerhead import __version__
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -45,9 +45,9 @@
# built documents.
#
# The short X.Y version.
-version = '1.17'
+version = __version__
# The full version, including alpha/beta/rc tags.
-release = '1.17'
+release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff -Nru loggerhead-1.19~bzr511/docs/index.rst loggerhead-2.0.1+bzr541+ds/docs/index.rst
--- loggerhead-1.19~bzr511/docs/index.rst 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/docs/index.rst 2022-09-21 12:13:25.749000000 +0000
@@ -13,11 +13,11 @@
Loggerhead depends on the following Python libraries.:
-- SimpleTAL for templating.
+- Chameleon for templating.
- Paste for the server. (You need version 1.2 or newer of Paste).
-- Paste Deploy (optional, needed when proxying through Apache).
+- PasteDeploy (optional, needed when proxying through Apache).
- flup (optional, needed to use FastCGI, SCGI or AJP).
@@ -27,22 +27,24 @@
.. code-block:: sh
- $ sudo apt-get install python-simpletal
+ $ sudo apt-get install python-chameleon
$ sudo apt-get install python-paste
$ sudo apt-get install python-pastedeploy
$ sudo apt-get install python-flup
-Installing Dependencies Using :command:`easy_install`
-#####################################################
+Installing Dependencies Using :command:`pip`
+############################################
+
+You should normally create and activate a virtual environment first.
.. code-block:: sh
- $ easy_install \
- -f http://www.owlfish.com/software/simpleTAL/py2compatible/download.html \
- SimpleTAL
- $ easy_install Paste
- $ easy_install PasteDeploy
- $ easy_install flup
+ # Basic installation only
+ $ pip install loggerhead
+ # Installation for proxying through Apache
+ $ pip install 'loggerhead[proxied]'
+ # Installation for FastCGI, SCGI or AJP
+ $ pip install 'loggerhead[flup]'
Running the Standalone Loggerhead Server
diff -Nru loggerhead-1.19~bzr511/__init__.py loggerhead-2.0.1+bzr541+ds/__init__.py
--- loggerhead-1.19~bzr511/__init__.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/__init__.py 2022-09-21 12:13:25.749000000 +0000
@@ -30,9 +30,19 @@
starts a web server to browse the contents of a branch.
"""
+try:
+ import importlib.metadata as importlib_metadata
+except ImportError:
+ import importlib_metadata
import sys
-version_info = (1, 20, 0) # Keep in sync with loggerhead/__init__.py
+from packaging.version import Version
+
+try:
+ version_info = Version(importlib_metadata.version("loggerhead")).release
+except importlib_metadata.PackageNotFoundError:
+ # Support running tests from the build tree without installation.
+ version_info = None
import breezy
from breezy import commands
@@ -111,6 +121,9 @@
try:
from .loggerhead.tests import test_suite
except ImportError:
- from loggerhead.tests import test_suite
- basic_tests.addTest(test_suite())
+ from breezy.trace import mutter
+ mutter(
+ 'loggerhead tests not installed, not registering tests')
+ else:
+ basic_tests.addTest(test_suite())
return basic_tests
diff -Nru loggerhead-1.19~bzr511/loggerhead/apps/branch.py loggerhead-2.0.1+bzr541+ds/loggerhead/apps/branch.py
--- loggerhead-1.19~bzr511/loggerhead/apps/branch.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/apps/branch.py 2022-09-21 12:13:25.749000000 +0000
@@ -29,7 +29,7 @@
from paste import request
from paste import httpexceptions
-from ..apps import static_app
+from ..apps import static_app, health_app
from ..controllers.annotate_ui import AnnotateUI
from ..controllers.view_ui import ViewUI
from ..controllers.atom_ui import AtomUI
@@ -190,6 +190,8 @@
if not path:
raise httpexceptions.HTTPMovedPermanently(
self.absolute_url('/changes'))
+ if path == 'health':
+ return health_app
if path == 'static':
return static_app
elif path == '+json':
diff -Nru loggerhead-1.19~bzr511/loggerhead/apps/__init__.py loggerhead-2.0.1+bzr541+ds/loggerhead/apps/__init__.py
--- loggerhead-1.19~bzr511/loggerhead/apps/__init__.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/apps/__init__.py 2022-09-21 12:13:25.749000000 +0000
@@ -18,3 +18,8 @@
robots_app = convert_file_errors(fileapp.FileApp(
os.path.join(static, 'robots.txt')))
+
+
+def health_app(environ, start_response):
+ start_response('200 OK', [])
+ yield b'ok'
diff -Nru loggerhead-1.19~bzr511/loggerhead/changecache.py loggerhead-2.0.1+bzr541+ds/loggerhead/changecache.py
--- loggerhead-1.19~bzr511/loggerhead/changecache.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/changecache.py 2022-09-21 12:13:25.749000000 +0000
@@ -26,19 +26,13 @@
cached a change, it's good forever.
"""
-try:
- import cPickle as pickle
-except ImportError: # Python >= 3
- import pickle
+import pickle
import marshal
import os
import tempfile
import zlib
-try:
- from sqlite3 import dbapi2
-except ImportError:
- from pysqlite2 import dbapi2
+from sqlite3 import dbapi2
# We take an optimistic approach to concurrency here: we might do work twice
# in the case of races, but not crash or corrupt data.
@@ -130,7 +124,10 @@
elif str(row[0]) != revid:
return None
else:
- return marshal.loads(zlib.decompress(row[1]))
+ try:
+ return marshal.loads(zlib.decompress(row[1]))
+ except (EOFError, ValueError, TypeError):
+ return None
def set(self, key, revid, data):
if not isinstance(key, bytes):
@@ -140,7 +137,7 @@
try:
self.cursor.execute(
'delete from data where key = ?', (dbapi2.Binary(key), ))
- blob = zlib.compress(marshal.dumps(data))
+ blob = zlib.compress(marshal.dumps(data, 2))
self.cursor.execute(
"insert into data (key, revid, data) values (?, ?, ?)",
list(map(dbapi2.Binary, [key, revid, blob])))
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/annotate_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/annotate_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/annotate_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/annotate_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -24,14 +24,10 @@
class AnnotateUI(ViewUI):
- def annotate_file(self, info):
- file_id = info['file_id']
+ def annotate_file(self, path, info):
revid = info['change'].revid
- if not isinstance(file_id, bytes):
- raise TypeError(file_id)
if not isinstance(revid, bytes):
raise TypeError(revid)
- path = self._history.get_path(revid, file_id)
tree = self.tree_for(path, revid)
@@ -43,7 +39,7 @@
revisions = {}
lineno = 0
- for (line_revid, text), lineno in zip(tree.annotate_iter(path, file_id), itertools.count(1)):
+ for (line_revid, text), lineno in zip(tree.annotate_iter(path), itertools.count(1)):
if line_revid != last_line_revid:
last_line_revid = line_revid
@@ -84,6 +80,6 @@
def get_values(self, path, kwargs, headers):
values = super(AnnotateUI, self).get_values(path, kwargs, headers)
- values['annotated'] = self.annotate_file(values)
+ values['annotated'] = self.annotate_file(path, values)
return values
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/changelog_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/changelog_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/changelog_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/changelog_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -35,21 +35,16 @@
def get_values(self, path, kwargs, headers):
history = self._history
revid = self.get_revid()
- filter_file_id = kwargs.get('filter_file_id', None)
- if filter_file_id is not None:
- filter_file_id = urlutils.unquote_to_bytes(osutils.safe_utf8(filter_file_id))
+ filter_path = kwargs.get('filter_path', path)
query = kwargs.get('q', None)
start_revid = history.fix_revid(kwargs.get('start_revid', None))
orig_start_revid = start_revid
- pagesize = 20#int(config.get('pagesize', '20'))
+ pagesize = 20 #int(config.get('pagesize', '20'))
search_failed = False
- if filter_file_id is None and path is not None:
- filter_file_id = history.get_file_id(revid, path)
-
try:
revid, start_revid, revid_list = history.get_view(
- revid, start_revid, filter_file_id, query,
+ revid, start_revid, filter_path, query,
extra_rev_count=pagesize+1)
util.set_context(kwargs)
@@ -76,7 +71,7 @@
navigation = util.Container(
pagesize=pagesize, revid=revid, start_revid=start_revid,
- revid_list=revid_list, filter_file_id=filter_file_id,
+ revid_list=revid_list, filter_path=filter_path,
scan_url='/changes', branch=self._branch, feed=True, history=history)
if query is not None:
navigation.query = query
@@ -104,7 +99,7 @@
'history': history,
'revid': revid,
'navigation': navigation,
- 'filter_file_id': filter_file_id,
+ 'filter_path': filter_path,
'start_revid': start_revid,
'viewing_from': (orig_start_revid is not None) and
(orig_start_revid != history.last_revid),
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/directory_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/directory_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/directory_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/directory_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -22,6 +22,11 @@
from breezy import branch, errors, urlutils
+try:
+ from breezy.transport import NoSuchFile
+except ImportError:
+ from breezy.errors import NoSuchFile
+
from .. import util
from ..controllers import TemplatedBranchView
@@ -77,7 +82,7 @@
try:
if not stat.S_ISDIR(self.transport.stat(d).st_mode):
continue
- except errors.NoSuchFile:
+ except NoSuchFile:
continue
b = None
else:
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/download_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/download_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/download_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/download_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -22,10 +22,13 @@
import urllib
from breezy.errors import (
- NoSuchFile,
NoSuchId,
NoSuchRevision,
)
+try:
+ from breezy.transport import NoSuchFile
+except ImportError:
+ from breezy.errors import NoSuchFile
from breezy import osutils, urlutils
from paste import httpexceptions
from paste.request import path_info_pop
@@ -59,14 +62,9 @@
self._branch.absolute_url('/changes'))
revid = h.fix_revid(args[0])
try:
- path, filename, content = h.get_file(args[1], revid)
+ path, filename, content = h.get_file("/".join(args[1:]), revid)
except (NoSuchFile, NoSuchRevision):
- # Compatibility API for /download/rev_id/file_id/
- try:
- path, filename, content = h.get_file_by_fileid(
- args[1].encode('UTF-8'), revid)
- except (NoSuchId, NoSuchRevision):
- raise httpexceptions.HTTPNotFound()
+ raise httpexceptions.HTTPNotFound()
mime_type, encoding = mimetypes.guess_type(filename)
if mime_type is None:
mime_type = 'application/octet-stream'
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/filediff_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/filediff_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/filediff_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/filediff_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -6,16 +6,10 @@
urlutils,
)
try:
- from breezy.tree import find_previous_path
-except ImportError: # breezy < 3.1
- def find_previous_path(from_tree, to_tree, path):
- file_id = from_tree.path2id(path)
- if file_id is None:
- raise errors.NoSuchFile(path)
- try:
- return to_tree.id2path(file_id)
- except errors.NoSuchId:
- return None
+ from breezy.transport import NoSuchFile
+except ImportError:
+ from breezy.errors import NoSuchFile
+from breezy.tree import find_previous_path
from .. import util
from ..controllers import TemplatedBranchView
@@ -81,7 +75,7 @@
tree = repository.revision_tree(revid)
try:
lines[revid] = tree.get_file_lines(filename)
- except errors.NoSuchFile:
+ except NoSuchFile:
lines[revid] = []
lines[compare_revid] = compare_tree.get_file_lines(filename)
else:
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/inventory_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/inventory_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/inventory_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/inventory_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -95,7 +95,7 @@
file = util.Container(
filename=entry.name, executable=entry.executable,
kind=entry.kind, absolutepath=child_path,
- file_id=entry.file_id, size=size, revid=child_revision,
+ size=size, revid=child_revision,
change=change_dict[child_revision], contents_changed_rev=contents_changed_rev)
file_list.append(file)
@@ -125,23 +125,15 @@
except errors.NoSuchRevision:
raise HTTPNotFound()
- file_id = kwargs.get('file_id', None)
start_revid = kwargs.get('start_revid', None)
sort_type = kwargs.get('sort', 'filename')
- if path is not None:
- path = path.rstrip('/')
- file_id = rev_tree.path2id(path)
- if file_id is None:
- raise HTTPNotFound()
- else:
- if file_id is None:
- path = ''
- else:
- try:
- path = rev_tree.id2path(file_id)
- except errors.NoSuchId:
- raise HTTPNotFound()
+ if path is None:
+ path = "/"
+
+ path = path.rstrip('/')
+ if not rev_tree.has_filename(path) and not is_null_rev(revid):
+ raise HTTPNotFound()
# Are we at the top of the tree
if path in ['/', '']:
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/revision_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/revision_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/revision_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/revision_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -32,7 +32,9 @@
def dq(p):
- return urlutils.quote(urlutils.quote(p, safe=''))
+ if not isinstance(p, bytes):
+ p = p.encode('UTF-8')
+ return urlutils.quote(urlutils.quote_from_bytes(p, safe=''))
class RevisionUI(TemplatedBranchView):
@@ -44,7 +46,7 @@
h = self._history
revid = self.get_revid()
- filter_file_id = kwargs.get('filter_file_id', None)
+ filter_path = kwargs.get('filter_path', None)
start_revid = h.fix_revid(kwargs.get('start_revid', None))
query = kwargs.get('q', None)
compare_revid = h.fix_revid(kwargs.get('compare_revid', None))
@@ -54,7 +56,7 @@
try:
revid, start_revid, revid_list = h.get_view(revid,
start_revid,
- filter_file_id,
+ filter_path,
query)
except BaseException:
self.log.exception('Exception fetching changes')
@@ -100,12 +102,12 @@
super(RevisionUI, self).add_template_values(values)
remember = self._history.fix_revid(self.kwargs.get('remember', None))
query = self.kwargs.get('q', None)
- filter_file_id = self.kwargs.get('filter_file_id', None)
+ filter_path = self.kwargs.get('filter_path', None)
start_revid = self.kwargs['start_revid']
navigation = util.Container(
revid_list=self.revid_list, revid=values['revid'],
start_revid=start_revid,
- filter_file_id=filter_file_id, pagesize=1,
+ filter_path=filter_path, pagesize=1,
scan_url='/revision', branch=self._branch, feed=True,
history=self._history)
if query is not None:
@@ -159,7 +161,7 @@
'navigation': navigation,
'remember': remember,
'compare_revid': self.compare_revid,
- 'filter_file_id': filter_file_id,
+ 'filter_path': filter_path,
'diff_chunks': diff_chunks,
'query': query,
'can_export': can_export,
diff -Nru loggerhead-1.19~bzr511/loggerhead/controllers/view_ui.py loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/view_ui.py
--- loggerhead-1.19~bzr511/loggerhead/controllers/view_ui.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/controllers/view_ui.py 2022-09-21 12:13:25.749000000 +0000
@@ -21,10 +21,13 @@
from breezy.errors import (
BinaryFile,
- NoSuchFile,
NoSuchId,
NoSuchRevision,
)
+try:
+ from breezy.transport import NoSuchFile
+except ImportError:
+ from breezy.errors import NoSuchFile
from breezy import (
osutils,
urlutils,
@@ -50,7 +53,7 @@
template_name = 'view'
def tree_for(self, path, revid):
- if not isinstance(path, util.text_type):
+ if not isinstance(path, str):
raise TypeError(path)
if not isinstance(revid, bytes):
raise TypeError(revid)
@@ -82,7 +85,7 @@
extra_lines = len(file_lines) - len(hl_lines)
hl_lines.extend([u''] * extra_lines)
else:
- hl_lines = map(util.html_escape, file_lines)
+ hl_lines = [util.html_escape(line) for line in file_lines]
return hl_lines
@@ -99,19 +102,10 @@
history = self._history
branch = history._branch
revid = self.get_revid()
- file_id = kwargs.get('file_id', None)
- if file_id is not None:
- file_id = urlutils.unquote_to_bytes(osutils.safe_utf8(file_id))
- if (file_id is None) and (path is None):
- raise HTTPBadRequest('No file_id or filename '
- 'provided to view')
+ if path is None:
+ raise HTTPBadRequest('No filename provided to view')
- try:
- if file_id is None:
- file_id = history.get_file_id(revid, path)
- if path is None:
- path = history.get_path(revid, file_id)
- except (NoSuchId, NoSuchRevision):
+ if not history.file_exists(revid, path):
raise HTTPNotFound()
filename = os.path.basename(path)
@@ -151,7 +145,6 @@
# checking whether we're in "annotated" mode.
'annotated': {},
'revno_url': revno_url,
- 'file_id': file_id,
'file_path': path,
'filename': filename,
'navigation': navigation,
diff -Nru loggerhead-1.19~bzr511/loggerhead/highlight.py loggerhead-2.0.1+bzr541+ds/loggerhead/highlight.py
--- loggerhead-1.19~bzr511/loggerhead/highlight.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/highlight.py 2022-09-21 12:13:25.749000000 +0000
@@ -17,10 +17,7 @@
#
import breezy.osutils
-try:
- from html import escape
-except ImportError:
- from cgi import escape
+from html import escape
from pygments import highlight as _highlight_func
from pygments.lexers import guess_lexer, guess_lexer_for_filename, TextLexer
@@ -40,7 +37,7 @@
"""
if len(text) > MAX_HIGHLIGHT_SIZE:
- return map(escape, breezy.osutils.split_lines(text))
+ return list(map(escape, breezy.osutils.split_lines(text)))
formatter = HtmlFormatter(style=style, nowrap=True, classprefix='pyg-')
diff -Nru loggerhead-1.19~bzr511/loggerhead/history.py loggerhead-2.0.1+bzr541+ds/loggerhead/history.py
--- loggerhead-1.19~bzr511/loggerhead/history.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/history.py 2022-09-21 12:13:25.749000000 +0000
@@ -34,7 +34,6 @@
import textwrap
import threading
-from breezy import version_info as breezy_version
from breezy import tag
import breezy.branch
import breezy.delta
@@ -43,6 +42,11 @@
import breezy.osutils
import breezy.revision
+try:
+ from breezy.transport import NoSuchFile
+except ImportError:
+ from breezy.errors import NoSuchFile
+
from . import search
from . import util
from .wholehistory import compute_whole_history_data
@@ -124,21 +128,14 @@
return breezy.revision.NULL_REVISION
try:
return tree.get_file_revision(path)
- except breezy.errors.NoSuchFile:
+ except NoSuchFile:
return breezy.revision.NULL_REVISION
- if breezy_version >= (3, 1):
- def report(self, paths, versioned, renamed, copied, modified,
- exe_change, kind):
- return self._report(
- paths, versioned, renamed, copied,
- modified, exe_change, kind)
- else:
- def report(self, file_id, paths, versioned, renamed, modified,
- exe_change, kind):
- return self._report(
- paths, versioned, renamed, None,
- modified, exe_change, kind)
+ def report(self, paths, versioned, renamed, copied, modified,
+ exe_change, kind):
+ return self._report(
+ paths, versioned, renamed, copied,
+ modified, exe_change, kind)
def _report(self, paths, versioned, renamed, copied, modified,
exe_change, kind):
@@ -376,6 +373,7 @@
def get_short_revision_history_by_fileid(self, file_id):
# FIXME: would be awesome if we could get, for a folder, the list of
# revisions where items within that folder changed.i
+ # TODO(jelmer): Avoid versionedfile-specific texts
possible_keys = [(file_id, revid) for revid in self._rev_indices]
get_parent_map = self._branch.repository.texts.get_parent_map
# We chunk the requests as this works better with GraphIndex.
@@ -465,7 +463,7 @@
# if a "revid" is actually a dotted revno, convert it to a revid
if revid is None:
return revid
- if not isinstance(revid, (str, util.text_type)):
+ if not isinstance(revid, str):
raise TypeError(revid)
if revid == 'head:':
return self.last_revid
@@ -478,24 +476,6 @@
revid = revid.encode('utf-8')
return revid
- def get_file_view(self, revid, file_id):
- """
- Given a revid and optional path, return a (revlist, revid) for
- navigation through the current scope: from the revid (or the latest
- revision) back to the original revision.
-
- If file_id is None, the entire revision history is the list scope.
- """
- if revid is None:
- revid = self.last_revid
- if file_id is not None:
- revlist = list(
- self.get_short_revision_history_by_fileid(file_id))
- revlist = self.get_revids_from(revlist, revid)
- else:
- revlist = self.get_revids_from(None, revid)
- return revlist
-
@staticmethod
def _iterate_sufficiently(iterable, stop_at, extra_rev_count):
"""Return a list of iterable.
@@ -522,15 +502,33 @@
result.append(n)
return result
- def get_view(self, revid, start_revid, file_id, query=None,
+ def _get_file_view(self, revid, file_id):
+ """
+ Given a revid and optional path, return a (revlist, revid) for
+ navigation through the current scope: from the revid (or the latest
+ revision) back to the original revision.
+
+ If file_id is None, the entire revision history is the list scope.
+ """
+ if revid is None:
+ revid = self.last_revid
+ if file_id is not None:
+ revlist = list(
+ self.get_short_revision_history_by_fileid(file_id))
+ revlist = self.get_revids_from(revlist, revid)
+ else:
+ revlist = self.get_revids_from(None, revid)
+ return revlist
+
+ def get_view(self, revid, start_revid, path, query=None,
extra_rev_count=None):
"""
- use the URL parameters (revid, start_revid, file_id, and query) to
- determine the revision list we're viewing (start_revid, file_id, query)
+ use the URL parameters (revid, start_revid, path, and query) to
+ determine the revision list we're viewing (start_revid, path, query)
and where we are in it (revid).
- if a query is given, we're viewing query results.
- - if a file_id is given, we're viewing revisions for a specific
+ - if a path is given, we're viewing revisions for a specific
file.
- if a start_revid is given, we're viewing the branch from a
specific revision up the tree.
@@ -548,14 +546,19 @@
- start_revid: starting revision of this view
- revid_list: list of revision ids for this view
- file_id and query are never changed so aren't returned, but they may
+ path and query are never changed so aren't returned, but they may
contain vital context for future url navigation.
"""
if start_revid is None:
start_revid = self.last_revid
if query is None:
- revid_list = self.get_file_view(start_revid, file_id)
+ repo = self._branch.repository
+ if path is not None:
+ file_id = repo.revision_tree(start_revid).path2id(path)
+ else:
+ file_id = None
+ revid_list = self._get_file_view(start_revid, file_id)
revid_list = self._iterate_sufficiently(revid_list, revid,
extra_rev_count)
if revid is None:
@@ -563,15 +566,17 @@
if revid not in revid_list:
# if the given revid is not in the revlist, use a revlist that
# starts at the given revid.
- revid_list = self.get_file_view(revid, file_id)
+ revid_list = self._get_file_view(revid, file_id)
revid_list = self._iterate_sufficiently(revid_list, revid,
extra_rev_count)
start_revid = revid
return revid, start_revid, revid_list
+ else:
+ file_id = None
# potentially limit the search
if file_id is not None:
- revid_list = self.get_file_view(start_revid, file_id)
+ revid_list = self._get_file_view(start_revid, file_id)
else:
revid_list = None
revid_list = search.search_revisions(self._branch, query)
@@ -588,18 +593,13 @@
def revision_tree(self, revid):
return self._branch.repository.revision_tree(revid)
- def get_path(self, revid, file_id):
- if (file_id is None) or (file_id == ''):
- return ''
- path = self.revision_tree(revid).id2path(file_id)
+ def file_exists(self, revid, path):
if (len(path) > 0) and not path.startswith('/'):
path = '/' + path
- return path
-
- def get_file_id(self, revid, path):
- if (len(path) > 0) and not path.startswith('/'):
- path = '/' + path
- return self.revision_tree(revid).path2id(path)
+ try:
+ return self.revision_tree(revid).has_filename(path)
+ except breezy.errors.NoSuchRevision:
+ return False
def get_merge_point_list(self, revid):
"""
@@ -786,32 +786,15 @@
return (display_path, breezy.osutils.basename(path),
rev_tree.get_file_text(path))
- def get_file_by_fileid(self, fileid, revid):
- """Returns (path, filename, file contents)"""
- if not isinstance(fileid, bytes):
- raise TypeError(fileid)
- if not isinstance(revid, bytes):
- raise TypeError(revid)
- rev_tree = self._branch.repository.revision_tree(revid)
- path = rev_tree.id2path(fileid)
- display_path = path
- if not display_path.startswith('/'):
- path = '/' + path
- return (display_path, breezy.osutils.basename(path),
- rev_tree.get_file_text(path))
-
def file_changes_for_revision_ids(self, old_revid, new_revid):
"""
Return a nested data structure containing the changes in a delta::
- added: list((filename, file_id)),
- renamed: list((old_filename, new_filename, file_id)),
- deleted: list((filename, file_id)),
- modified: list(
- filename: str,
- file_id: str,
- ),
- text_changes: list((filename, file_id)),
+ added: list((filename)),
+ renamed: list((old_filename, new_filename)),
+ deleted: list((filename)),
+ modified: list((filename)),
+ text_changes: list((filename)),
"""
repo = self._branch.repository
if (breezy.revision.is_null(old_revid) or
diff -Nru loggerhead-1.19~bzr511/loggerhead/__init__.py loggerhead-2.0.1+bzr541+ds/loggerhead/__init__.py
--- loggerhead-1.19~bzr511/loggerhead/__init__.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/__init__.py 2022-09-21 12:13:25.749000000 +0000
@@ -15,20 +15,20 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-"""A simple container to turn this into a python package.
+"""A simple container to turn this into a python package."""
-We also check the versions of some dependencies.
-"""
-
-import pkg_resources
-
-__version__ = '1.20.0' # Keep in sync with ../__init__.py.
-__revision__ = None
-required_breezy = (3, 0)
+try:
+ import importlib.metadata as importlib_metadata
+except ImportError:
+ import importlib_metadata
-pkg_resources.get_distribution('Paste>=1.6')
try:
- pkg_resources.get_distribution('PasteDeploy>=1.3')
-except pkg_resources.DistributionNotFound:
- # No paste.deploy is OK, but an old paste.deploy is bad.
- pass
+ __version__ = importlib_metadata.version("loggerhead")
+except importlib_metadata.PackageNotFoundError:
+ # Support running tests from the build tree without installation.
+ import os
+ from setuptools.config import read_configuration
+ cfg = read_configuration(os.path.join(os.path.dirname(__file__), '..', 'setup.cfg'))
+ __version__ = cfg['metadata']['version']
+__revision__ = None
+required_breezy = (3, 1)
diff -Nru loggerhead-1.19~bzr511/loggerhead/load_test.py loggerhead-2.0.1+bzr541+ds/loggerhead/load_test.py
--- loggerhead-1.19~bzr511/loggerhead/load_test.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/load_test.py 2022-09-21 12:13:25.749000000 +0000
@@ -65,10 +65,7 @@
import threading
import time
-try:
- from queue import Queue, Empty
-except ImportError: # Python < 3
- from Queue import Queue, Empty
+from queue import Queue, Empty
import json
@@ -78,6 +75,11 @@
urlutils,
)
+try:
+ from breezy.transport import NoSuchFile
+except ImportError:
+ from breezy.errors import NoSuchFile
+
# This code will be doing multi-threaded requests against breezy.transport
# code. We want to make sure to load everything ahead of time, so we don't get
# lazy-import failures
@@ -132,7 +134,7 @@
# blocking_timeout to decide when to stop trying to read
# content
content = t.get_bytes(path)
- except (errors.TransportError, errors.NoSuchFile):
+ except (errors.TransportError, NoSuchFile):
return False
return True
@@ -211,7 +213,7 @@
# And join the controlling thread
for i in range(10):
t.join(self.blocking_timeout / 10.0)
- if not t.isAlive():
+ if not t.is_alive():
break
def _full_url(self, relpath):
diff -Nru loggerhead-1.19~bzr511/loggerhead/lsprof.py loggerhead-2.0.1+bzr541+ds/loggerhead/lsprof.py
--- loggerhead-1.19~bzr511/loggerhead/lsprof.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/lsprof.py 2022-09-21 12:13:25.749000000 +0000
@@ -6,10 +6,7 @@
# instead of just the Stats object
import sys
-try:
- from threading import get_ident
-except ImportError: # python < 3
- from thread import get_ident
+from threading import get_ident
import threading
from _lsprof import Profiler, profiler_entry
diff -Nru loggerhead-1.19~bzr511/loggerhead/main.py loggerhead-2.0.1+bzr541+ds/loggerhead/main.py
--- loggerhead-1.19~bzr511/loggerhead/main.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/main.py 2022-09-21 12:13:25.749000000 +0000
@@ -22,10 +22,7 @@
import sys
from breezy.plugin import load_plugins
-try:
- from breezy.location import location_to_url
-except ImportError: # Breezy < 3.1
- from breezy.transport import location_to_url
+from breezy.location import location_to_url
from paste import httpserver
from paste.httpexceptions import HTTPExceptionHandler, HTTPInternalServerError
@@ -87,14 +84,6 @@
# if it is configured to suppress it
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
- def _restrict_logging(logger_name):
- logger = logging.getLogger(logger_name)
- if logger.getEffectiveLevel() < logging.INFO:
- logger.setLevel(logging.INFO)
- # simpleTAL is *very* verbose in DEBUG mode, which is otherwise the
- # default. So quiet it up a bit.
- _restrict_logging('simpleTAL')
- _restrict_logging('simpleTALES')
return logger
diff -Nru loggerhead-1.19~bzr511/loggerhead/static/css/diff.css loggerhead-2.0.1+bzr541+ds/loggerhead/static/css/diff.css
--- loggerhead-1.19~bzr511/loggerhead/static/css/diff.css 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/static/css/diff.css 2022-09-21 12:13:25.749000000 +0000
@@ -71,7 +71,7 @@
padding: 0 1%;
color: #000;
font-size: 85%;
- font-family: 'UbuntuBeta Mono', 'Ubuntu Mono', monospace;
+ font-family: 'Ubuntu Mono', monospace;
}
.unified .code {
width: 87%;
diff -Nru loggerhead-1.19~bzr511/loggerhead/static/css/global.css loggerhead-2.0.1+bzr541+ds/loggerhead/static/css/global.css
--- loggerhead-1.19~bzr511/loggerhead/static/css/global.css 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/static/css/global.css 2022-09-21 12:13:25.749000000 +0000
@@ -26,7 +26,7 @@
}
body {
font-weight: normal;
- font-family: UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif;
+ font-family: Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif;
color: #000;
background: #fff;
}
diff -Nru loggerhead-1.19~bzr511/loggerhead/static/css/view.css loggerhead-2.0.1+bzr541+ds/loggerhead/static/css/view.css
--- loggerhead-1.19~bzr511/loggerhead/static/css/view.css 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/static/css/view.css 2022-09-21 12:13:25.749000000 +0000
@@ -26,7 +26,7 @@
}
.viewLine pre,
.viewCont pre {
- font-family: 'UbuntuBeta Mono', 'Ubuntu Mono', monospace;
+ font-family: 'Ubuntu Mono', monospace;
line-height: 1.1;
}
.viewLine pre {
diff -Nru loggerhead-1.19~bzr511/loggerhead/templatefunctions.py loggerhead-2.0.1+bzr541+ds/loggerhead/templatefunctions.py
--- loggerhead-1.19~bzr511/loggerhead/templatefunctions.py 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/templatefunctions.py 2022-09-21 12:13:25.749000000 +0000
@@ -180,8 +180,8 @@
else:
versions.append(('PasteDeploy', PasteDeploy.version))
- import simpletal
- versions.append(('SimpleTAL', simpletal.__version__))
+ Chameleon = pkg_resources.get_distribution('Chameleon')
+ versions.append(('Chameleon', Chameleon.version))
try:
import pygments
diff -Nru loggerhead-1.19~bzr511/loggerhead/templates/atom.pt loggerhead-2.0.1+bzr541+ds/loggerhead/templates/atom.pt
--- loggerhead-1.19~bzr511/loggerhead/templates/atom.pt 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/templates/atom.pt 2022-09-21 12:13:25.749000000 +0000
@@ -1,7 +1,7 @@
- bazaar changes for branch name
+ bazaar changes for branch name
${updated}
url
@@ -9,22 +9,22 @@
-
- ${entry/revno}: ${entry/short_comment}
+
+ ${entry.revno}: ${entry.short_comment}
-
+
updated
ID
-
+
author
-
+
comment
- /
+ /
- /
+ /
diff -Nru loggerhead-1.19~bzr511/loggerhead/templates/changelog.pt loggerhead-2.0.1+bzr541+ds/loggerhead/templates/changelog.pt
--- loggerhead-1.19~bzr511/loggerhead/templates/changelog.pt 2020-09-18 08:48:28.000000000 +0000
+++ loggerhead-2.0.1+bzr541+ds/loggerhead/templates/changelog.pt 2022-09-21 12:13:25.749000000 +0000
@@ -1,12 +1,12 @@
-
+