Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: gclient_scm.py

Issue 2448993003: Correctly guard file_list modification in gclient update (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Gclient-specific SCM-specific operations.""" 5 """Gclient-specific SCM-specific operations."""
6 6
7 from __future__ import print_function 7 from __future__ import print_function
8 8
9 import errno 9 import errno
10 import logging 10 import logging
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 if not printed_path: 667 if not printed_path:
668 self.Print('_____ %s at %s' % (self.relpath, revision), 668 self.Print('_____ %s at %s' % (self.relpath, revision),
669 timestamp=False) 669 timestamp=False)
670 printed_path = True 670 printed_path = True
671 self.Print(merge_output.strip()) 671 self.Print(merge_output.strip())
672 if not verbose: 672 if not verbose:
673 # Make the output a little prettier. It's nice to have some 673 # Make the output a little prettier. It's nice to have some
674 # whitespace between projects when syncing. 674 # whitespace between projects when syncing.
675 self.Print('') 675 self.Print('')
676 676
677 file_list.extend( 677 if file_list is not None:
678 [os.path.join(self.checkout_path, f) for f in rebase_files]) 678 file_list.extend(
679 [os.path.join(self.checkout_path, f) for f in rebase_files])
679 680
680 # If the rebase generated a conflict, abort and ask user to fix 681 # If the rebase generated a conflict, abort and ask user to fix
681 if self._IsRebasing(): 682 if self._IsRebasing():
682 raise gclient_utils.Error('\n____ %s at %s\n' 683 raise gclient_utils.Error('\n____ %s at %s\n'
683 '\nConflict while rebasing this branch.\n' 684 '\nConflict while rebasing this branch.\n'
684 'Fix the conflict and run gclient again.\n' 685 'Fix the conflict and run gclient again.\n'
685 'See man git-rebase for details.\n' 686 'See man git-rebase for details.\n'
686 % (self.relpath, revision)) 687 % (self.relpath, revision))
687 688
688 if verbose: 689 if verbose:
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 kwargs.setdefault('cwd', self.checkout_path) 1175 kwargs.setdefault('cwd', self.checkout_path)
1175 kwargs.setdefault('stdout', self.out_fh) 1176 kwargs.setdefault('stdout', self.out_fh)
1176 kwargs['filter_fn'] = self.filter 1177 kwargs['filter_fn'] = self.filter
1177 kwargs.setdefault('print_stdout', False) 1178 kwargs.setdefault('print_stdout', False)
1178 env = scm.GIT.ApplyEnvVars(kwargs) 1179 env = scm.GIT.ApplyEnvVars(kwargs)
1179 cmd = ['git'] + args 1180 cmd = ['git'] + args
1180 if show_header: 1181 if show_header:
1181 gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, **kwargs) 1182 gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, **kwargs)
1182 else: 1183 else:
1183 gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs) 1184 gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698