diff options
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r-- | subcmds/upload.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 20b8fe5d..09ee5c02 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -204,6 +204,12 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
204 | p.add_option('-y', '--yes', | 204 | p.add_option('-y', '--yes', |
205 | default=False, action='store_true', | 205 | default=False, action='store_true', |
206 | help='answer yes to all safe prompts') | 206 | help='answer yes to all safe prompts') |
207 | p.add_option('--ignore-untracked-files', | ||
208 | action='store_true', default=False, | ||
209 | help='ignore untracked files in the working copy') | ||
210 | p.add_option('--no-ignore-untracked-files', | ||
211 | dest='ignore_untracked_files', action='store_false', | ||
212 | help='always ask about untracked files in the working copy') | ||
207 | p.add_option('--no-cert-checks', | 213 | p.add_option('--no-cert-checks', |
208 | dest='validate_certs', action='store_false', default=True, | 214 | dest='validate_certs', action='store_false', default=True, |
209 | help='disable verifying ssl certs (unsafe)') | 215 | help='disable verifying ssl certs (unsafe)') |
@@ -370,6 +376,10 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
370 | 376 | ||
371 | # Check if there are local changes that may have been forgotten | 377 | # Check if there are local changes that may have been forgotten |
372 | changes = branch.project.UncommitedFiles() | 378 | changes = branch.project.UncommitedFiles() |
379 | if opt.ignore_untracked_files: | ||
380 | untracked = set(branch.project.UntrackedFiles()) | ||
381 | changes = [x for x in changes if x not in untracked] | ||
382 | |||
373 | if changes: | 383 | if changes: |
374 | key = 'review.%s.autoupload' % branch.project.remote.review | 384 | key = 'review.%s.autoupload' % branch.project.remote.review |
375 | answer = branch.project.config.GetBoolean(key) | 385 | answer = branch.project.config.GetBoolean(key) |