Skip to content

Commit b1b028d

Browse files
committed
Updates after testing
1. svn_ignore_ancestry is optional argument everywhere (so testing does not need to be changed, though no tests run with svn_ignore_ancestry = True) 2. use keyword arguments for passing svn_ignore_ancestry since it is optional 3. Small formatting changes for pylint
1 parent 9ea73e6 commit b1b028d

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

manic/checkout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def main(args):
355355
"No component {} found in {}".format(
356356
comp, args.externals))
357357

358-
source_tree = SourceTree(root_dir, external, args.svn_ignore_ancestry)
358+
source_tree = SourceTree(root_dir, external, svn_ignore_ancestry=args.svn_ignore_ancestry)
359359
printlog('Checking status of externals: ', end='')
360360
tree_status = source_tree.status()
361361
printlog('')

manic/repository_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .utils import fatal_error
1212

1313

14-
def create_repository(component_name, repo_info, svn_ignore_ancestry):
14+
def create_repository(component_name, repo_info, svn_ignore_ancestry=False):
1515
"""Determine what type of repository we have, i.e. git or svn, and
1616
create the appropriate object.
1717
@@ -20,7 +20,7 @@ def create_repository(component_name, repo_info, svn_ignore_ancestry):
2020
if protocol == 'git':
2121
repo = GitRepository(component_name, repo_info)
2222
elif protocol == 'svn':
23-
repo = SvnRepository(component_name, repo_info, svn_ignore_ancestry)
23+
repo = SvnRepository(component_name, repo_info, ignore_ancestry=svn_ignore_ancestry)
2424
elif protocol == 'externals_only':
2525
repo = None
2626
else:

manic/repository_svn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SvnRepository(Repository):
3737
"""
3838
RE_URLLINE = re.compile(r'^URL:')
3939

40-
def __init__(self, component_name, repo, ignore_ancestry):
40+
def __init__(self, component_name, repo, ignore_ancestry=False):
4141
"""
4242
Parse repo (a <repo> XML element).
4343
"""
@@ -277,7 +277,7 @@ def _svn_switch(url, ignore_ancestry, verbosity):
277277
"""
278278
cmd = ['svn', 'switch', '--quiet']
279279
if ignore_ancestry:
280-
cmd.append('--ignore-ancestry')
280+
cmd.append('--ignore-ancestry')
281281
cmd.append(url)
282282
if verbosity >= VERBOSITY_VERBOSE:
283283
printlog(' {0}'.format(' '.join(cmd)))

manic/sourcetree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def __init__(self, root_dir, name, ext_description, svn_ignore_ancestry):
6464
if self._externals:
6565
self._create_externals_sourcetree()
6666
repo = create_repository(
67-
name, ext_description[ExternalsDescription.REPO], svn_ignore_ancestry)
67+
name, ext_description[ExternalsDescription.REPO],
68+
svn_ignore_ancestry=svn_ignore_ancestry)
6869
if repo:
6970
self._repo = repo
7071

0 commit comments

Comments
 (0)