stash: add --noexternals option, stash_externals configuration flag
This commit is contained in:
parent
821d27863d
commit
d6f74de034
6
README
6
README
@ -64,6 +64,10 @@ Implemented subcommands:
|
||||
options:
|
||||
-e, --externals
|
||||
- also stash changes in externals (if no explicit targets given)
|
||||
- this option is implicitly on if the configuration value
|
||||
'stash_externals' is set to True
|
||||
--noexternals
|
||||
- reverse --externals (or the configuration value 'stash_externals')
|
||||
-k, --keep
|
||||
- create the stash object, but keep the changes locally as well
|
||||
- with --pop, do not remove the stash object after reapplying it
|
||||
@ -151,6 +155,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'].
|
||||
stash_externals: True or False to enable/disable whether '-e' is implicitly
|
||||
on for 'stash' subcommand. Defaults to False.
|
||||
|
||||
Configuration Examples:
|
||||
pager = 'less -FRXi' # enable case-insensitive searching in less
|
||||
|
10
jsvn
10
jsvn
@ -73,7 +73,8 @@ def get_config(svn):
|
||||
'branches': 'branch'},
|
||||
'svn': '',
|
||||
'ignore_executable_extensions':
|
||||
['.c', '.cc', '.h', '.txt']
|
||||
['.c', '.cc', '.h', '.txt'],
|
||||
'stash_externals': False,
|
||||
}
|
||||
|
||||
global_user_config_fname = os.path.expanduser('~/.jsvn')
|
||||
@ -1521,10 +1522,11 @@ def stash_drop_h(argv, svn, out, config):
|
||||
def stash_h(argv, svn, out, config):
|
||||
argv = argv[1:] # strip 'stash' command
|
||||
opts, args = getopt.getopt(argv, 'ekp',
|
||||
['list', 'pop', 'show', 'drop', 'externals', 'keep', 'patch'])
|
||||
['list', 'pop', 'show', 'drop', 'externals', 'noexternals',
|
||||
'keep', 'patch'])
|
||||
keep = False
|
||||
patch = False
|
||||
externals = False
|
||||
externals = config['stash_externals']
|
||||
for opt, arg in opts:
|
||||
if opt == '--list':
|
||||
return stash_list_h(args, svn, out, config)
|
||||
@ -1540,6 +1542,8 @@ def stash_h(argv, svn, out, config):
|
||||
patch = True
|
||||
elif opt in ('-e', '--externals'):
|
||||
externals = True
|
||||
elif opt == '--noexternals':
|
||||
externals = False
|
||||
return stash_save_h(args, svn, out, config, keep, patch, externals)
|
||||
|
||||
def root_h(argv, svn, out, config):
|
||||
|
Loading…
x
Reference in New Issue
Block a user