add "ignore_symlinks" configuration flag

This commit is contained in:
Josh Holtrop 2015-03-11 15:15:40 -04:00
parent 030c1c519f
commit 3107b78aa0
2 changed files with 7 additions and 1 deletions

2
README
View File

@ -165,6 +165,8 @@ Available configuration variables:
for newly added files which should not automatically have the
svn:executable property added for them even if the files are
executable. The default value is ['.c', '.cc', '.h', '.txt'].
ignore_symlinks: True or False to hide unversioned symlinks from appearing
in status output (default: False)
stash_externals: True or False to enable/disable whether '-e' is implicitly
on for 'stash' subcommand. Defaults to False.

6
jsvn
View File

@ -68,6 +68,7 @@ def get_config(svn):
'pager': '',
'use_pager': True,
'use_color': True,
'ignore_symlinks': False,
'aliases': {
# default jsvn aliases
'tags': 'tag',
@ -1184,12 +1185,15 @@ def status_h(argv, svn, out, config):
continue
# look for lines that should be ignored
if re.match(STATUS_LINE_REGEX, line):
m = re.match(STATUS_LINE_REGEX, line)
if m is not None:
action = line[0]
if action == 'X':
continue # don't print directory externals
elif line.startswith(' X '):
continue # don't print unmodified file externals
elif action == '?' and config['ignore_symlinks'] and os.path.islink(m.group(1)):
continue
# anything not matched yet will cause an external to be shown
if not external_printed: