From d98683e1c50490484ac469d5f5c9aba81a7dffad Mon Sep 17 00:00:00 2001 From: Tim Barnes Date: Fri, 9 Oct 2015 15:15:53 +0100 Subject: [PATCH] fixing issue with subversion module whereby the module was reporting local modifications being present when externals were being used --- lib/ansible/modules/source_control/subversion.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/source_control/subversion.py b/lib/ansible/modules/source_control/subversion.py index 24cc065c5a4..64a1b38b044 100644 --- a/lib/ansible/modules/source_control/subversion.py +++ b/lib/ansible/modules/source_control/subversion.py @@ -171,9 +171,10 @@ class Subversion(object): '''True if revisioned files have been added or modified. Unrevisioned files are ignored.''' lines = self._exec(["status", "--quiet", "--ignore-externals", self.dest]) # The --quiet option will return only modified files. - + # Match only revisioned files, i.e. ignore status '?'. + regex = re.compile(r'^[^?X]') # Has local mods if more than 0 modifed revisioned files. - return len(filter(len, lines)) > 0 + return len(filter(regex.match, lines)) > 0 def needs_update(self): curr, url = self.get_revision()