add "ignore_symlinks" configuration flag
This commit is contained in:
parent
030c1c519f
commit
3107b78aa0
2
README
2
README
@ -165,6 +165,8 @@ Available configuration variables:
|
|||||||
for newly added files which should not automatically have the
|
for newly added files which should not automatically have the
|
||||||
svn:executable property added for them even if the files are
|
svn:executable property added for them even if the files are
|
||||||
executable. The default value is ['.c', '.cc', '.h', '.txt'].
|
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
|
stash_externals: True or False to enable/disable whether '-e' is implicitly
|
||||||
on for 'stash' subcommand. Defaults to False.
|
on for 'stash' subcommand. Defaults to False.
|
||||||
|
|
||||||
|
6
jsvn
6
jsvn
@ -68,6 +68,7 @@ def get_config(svn):
|
|||||||
'pager': '',
|
'pager': '',
|
||||||
'use_pager': True,
|
'use_pager': True,
|
||||||
'use_color': True,
|
'use_color': True,
|
||||||
|
'ignore_symlinks': False,
|
||||||
'aliases': {
|
'aliases': {
|
||||||
# default jsvn aliases
|
# default jsvn aliases
|
||||||
'tags': 'tag',
|
'tags': 'tag',
|
||||||
@ -1184,12 +1185,15 @@ def status_h(argv, svn, out, config):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# look for lines that should be ignored
|
# 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]
|
action = line[0]
|
||||||
if action == 'X':
|
if action == 'X':
|
||||||
continue # don't print directory externals
|
continue # don't print directory externals
|
||||||
elif line.startswith(' X '):
|
elif line.startswith(' X '):
|
||||||
continue # don't print unmodified file externals
|
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
|
# anything not matched yet will cause an external to be shown
|
||||||
if not external_printed:
|
if not external_printed:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user