Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用它pysvn来确定工作副本的修订版本以及其内容是否与存储库中的内容相同(对于相同的修订版本)。
pysvn
获取修订号是没有问题的,但是我怎样才能知道工作副本中是否有任何未提交的更改。所以我正在寻找相当于检查是否svn status --ignore-externals没有不以X.
svn status --ignore-externals
X
我设法做到了:
def has_no_modifications(path_to_repository) statuses = client.status(path_to_repository, ignore=True, recurse=True) statuses = [s for s in statuses if s.data['text_status'] != pysvn.wc_status_kind.normal] return len(statuses) == 0