Merge pull request #783 from Gugli/fix-svn-has-local-mods-with-externals
Fix subversion module for repos with svn:externals files
This commit is contained in:
commit
118b00968c
1 changed files with 3 additions and 4 deletions
|
@ -153,11 +153,10 @@ class Subversion(object):
|
||||||
|
|
||||||
def has_local_mods(self):
|
def has_local_mods(self):
|
||||||
'''True if revisioned files have been added or modified. Unrevisioned files are ignored.'''
|
'''True if revisioned files have been added or modified. Unrevisioned files are ignored.'''
|
||||||
lines = self._exec(["status", self.dest])
|
lines = self._exec(["status", "--quiet", self.dest])
|
||||||
# Match only revisioned files, i.e. ignore status '?'.
|
# The --quiet option will return only modified files.
|
||||||
regex = re.compile(r'^[^?]')
|
|
||||||
# Has local mods if more than 0 modifed revisioned files.
|
# Has local mods if more than 0 modifed revisioned files.
|
||||||
return len(filter(regex.match, lines)) > 0
|
return len(filter(len, lines)) > 0
|
||||||
|
|
||||||
def needs_update(self):
|
def needs_update(self):
|
||||||
curr, url = self.get_revision()
|
curr, url = self.get_revision()
|
||||||
|
|
Loading…
Add table
Reference in a new issue