from bzrlib.branch import Branch
b = Branch.open(location_of_your_branch)
b.lock_read()
try:
# Retrieve the contents of the last revision
t = b.basis_tree()
revid = t.get_file_revision(t.path2id(your_filename))
print ".".join([str(x) for x in b.revision_id_to_dotted_revno(revid)])
finally:
b.unlock()
在Python中:
一种方法是有一个脚本,推到您的网站,这个脚本的情况下更新版本.py或者类似的:
如果需要获取修改文件的最新版本,可以使用以下命令:
相关问题 更多 >
编程相关推荐