# HG changeset patch # User Marcin Kuzminski # Date 2016-12-04 23:28:46 # Node ID 36ec6f9eaae90fba16a4a5258005f91292879644 # Parent 160d7190d6fb522dba5b2c33e6e8a2765264d88f pep8: fixed issue with shadowing reserved python variables. diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -389,14 +389,14 @@ class HgRemote(object): repo = self._factory.repo(wire) if file_filter: - filter = match(file_filter[0], '', [file_filter[1]]) + match_filter = match(file_filter[0], '', [file_filter[1]]) else: - filter = file_filter + match_filter = file_filter opts = diffopts(git=opt_git, ignorews=opt_ignorews, context=context) try: return "".join(patch.diff( - repo, node1=rev1, node2=rev2, match=filter, opts=opts)) + repo, node1=rev1, node2=rev2, match=match_filter, opts=opts)) except RepoLookupError: raise exceptions.LookupException() diff --git a/vcsserver/svn_diff.py b/vcsserver/svn_diff.py --- a/vcsserver/svn_diff.py +++ b/vcsserver/svn_diff.py @@ -76,12 +76,14 @@ def filter_ignorable_lines(hunks, fromli elif tag == 'replace' and (ignore_case or ignore_space_changes): if len(fromlines) != len(tolines): return False - def f(str): + + def f(input_str): if ignore_case: - str = str.lower() + input_str = input_str.lower() if ignore_space_changes: - str = ' '.join(str.split()) - return str + input_str = ' '.join(input_str.split()) + return input_str + for i in range(len(fromlines)): if f(fromlines[i]) != f(tolines[i]): return False