# HG changeset patch # User rjollos # Date 1401554261 25200 # Node ID 96c854b89f5ce17ef8937d6b67b8c6fb59e21a75 # Parent 635936bdbe09ffa70117b6ab9d715aa2b3c02d24 1.0.0.3dev: Add implementation for `get_path_history`, which will be an abstract method of the `Repository` base class in a future release of Trac. diff -r 635936bdbe09 -r 96c854b89f5c tracext/hg/backend.py --- a/tracext/hg/backend.py Fri May 30 06:20:59 2014 -0700 +++ b/tracext/hg/backend.py Sat May 31 09:37:41 2014 -0700 @@ -33,7 +33,7 @@ from trac.util import arity from trac.util.datefmt import FixedOffset, utc from trac.util.text import exception_to_unicode, shorten_line, to_unicode -from trac.util.translation import domain_functions +from trac.util.translation import _, domain_functions from trac.versioncontrol.api import Changeset, Node, Repository, \ IRepositoryConnector, RepositoryManager, \ NoSuchChangeset, NoSuchNode @@ -750,6 +750,9 @@ def get_youngest_rev(self): return self.changectx().hex() + def get_path_history(self, path, rev=None, limit=None): + raise TracError(_('Unsupported "Show only adds and deletes"')) + def previous_rev(self, rev, path=''): # FIXME: path ignored for now for p in self.changectx(rev).parents(): if p: