diff options
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_version.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py index f398e4d68a..6e8764db64 100644 --- a/buildtools/wafsamba/samba_version.py +++ b/buildtools/wafsamba/samba_version.py @@ -3,7 +3,7 @@ import Utils def bzr_version_summary(path): try: - from bzrlib import branch, osutils + from bzrlib import branch, osutils, workingtree except ImportError: return ("BZR-UNKNOWN", {}) @@ -36,12 +36,11 @@ def bzr_version_summary(path): fields["GIT_COMMIT_FULLREV"] = full_rev ret = "GIT-" + fields["GIT_COMMIT_ABBREV"] - clean = Utils.cmd_output('bzr diff | wc -l', silent=True) - if clean == "0\n": - fields["COMMIT_IS_CLEAN"] = "1" - else: + if workingtree.WorkingTree.open(path).has_changes(): fields["COMMIT_IS_CLEAN"] = "0" ret += "+" + else: + fields["COMMIT_IS_CLEAN"] = "1" return (ret, fields) |