Hi,
On 21.02.2015 16:48, Matthias Rustler wrote:
Hi,
I'm doing my 1st attempt to write a macro. How can I do something like
this in v1.0.4:
file = open("source:/trunk/documentation/file.txt
<https://trac.aros.org/trac/browser/AROS/trunk/documentation/documentation/developers/autodocs/amigaguide.en>")
from trac.versioncontrol.api import RepositoryManager
rm = RepositoryManager(self.env)
reponame, repos, path
= rm.get_repository_by_path("/trunk/documentation/file.txt
<https://trac.aros.org/trac/browser/AROS/trunk/documentation/documentation/developers/autodocs/amigaguide.en>")
node = repos.get_node(path, repos.youngest_rev)
stream = node.get_content()
For more information see:
http://www.edgewall.org/docs/branches-1.0-stable/html/api/trac_versioncontrol_api.html#trac.versioncontrol.api.RepositoryManager.get_repository_by_path
http://www.edgewall.org/docs/branches-1.0-stable/html/api/trac_versioncontrol_api.html#trac.versioncontrol.api.Repository.get_node
http://www.edgewall.org/docs/branches-1.0-stable/html/api/trac_versioncontrol_api.html#trac.versioncontrol.api.Node.get_content
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.