如何在我的网站上获取文件的 Bazaar 版本?
我之前也遇到过类似的问题。一个例子: 如何获取 svn 修订号在 PHP 中?
但今天我正在处理一个使用 BZR 管理的项目。我需要获取特定文件的集市版本,并在我们的网站上发布该图,以便在文件更新时自动更新。
该网站全部使用 Python 编写,因此我愿意在幕后读取文件,但如果有的话,我更喜欢更被动的方法。
There have been similar questions to this that I've been involved with before. One example: How can I get the svn revision number in PHP?
But today I'm tackling a project that is managed with BZR. I need to get the bazaar version for a particular file and publish that figure on our website in a way that it automatically updates when the file is update.
The website is all in Python so I'm open to reading files behind the scenes but I would prefer a more passive method if available.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您需要获取修改文件的最新版本,可以使用以下命令:
If you need to get the latest revision in which a file was modified, you can doit using the following command:
在Python中:
In Python:
一种方法是使用一个脚本推送到您的网站,此脚本案例更新 version.py 或类似的内容:
One way is to have a script that pushes to your website, this script case update version.py or something like that: