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

Side by Side Diff: gclient.py

Issue 146050: Fix silly typo issue. Not sure how the original code worked on my box. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 6 months 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 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright 2008 Google Inc. All Rights Reserved. 3 # Copyright 2008 Google Inc. All Rights Reserved.
4 # 4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License. 6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at 7 # You may obtain a copy of the License at
8 # 8 #
9 # http://www.apache.org/licenses/LICENSE-2.0 9 # http://www.apache.org/licenses/LICENSE-2.0
10 # 10 #
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 self._RunHooks(command, file_list, is_using_git) 1347 self._RunHooks(command, file_list, is_using_git)
1348 1348
1349 if command == 'update': 1349 if command == 'update':
1350 # Notify the user if there is an orphaned entry in their working copy. 1350 # Notify the user if there is an orphaned entry in their working copy.
1351 # Only delete the directory if there are no changes in it, and 1351 # Only delete the directory if there are no changes in it, and
1352 # delete_unversioned_trees is set to true. 1352 # delete_unversioned_trees is set to true.
1353 prev_entries = self._ReadEntries() 1353 prev_entries = self._ReadEntries()
1354 for entry in prev_entries: 1354 for entry in prev_entries:
1355 e_dir = os.path.join(self._root_dir, entry) 1355 e_dir = os.path.join(self._root_dir, entry)
1356 if entry not in entries and os.path.exists(e_dir): 1356 if entry not in entries and os.path.exists(e_dir):
1357 if not options.delete_unversioned_trees or CaptureSVNStatus(e_dir): 1357 if not self._options.delete_unversioned_trees or \
1358 CaptureSVNStatus(e_dir):
1358 # There are modified files in this entry 1359 # There are modified files in this entry
1359 entries[entry] = None # Keep warning until removed. 1360 entries[entry] = None # Keep warning until removed.
1360 print("\nWARNING: \"%s\" is no longer part of this client. " 1361 print("\nWARNING: \"%s\" is no longer part of this client. "
1361 "It is recommended that you manually remove it.\n") % entry 1362 "It is recommended that you manually remove it.\n") % entry
1362 else: 1363 else:
1363 # Delete the entry 1364 # Delete the entry
1364 print("\n________ deleting \'%s\' " + 1365 print("\n________ deleting \'%s\' " +
1365 "in \'%s\'") % (entry, self._root_dir) 1366 "in \'%s\'") % (entry, self._root_dir)
1366 RemoveDirectory(e_dir) 1367 RemoveDirectory(e_dir)
1367 # record the current list of entries for next time 1368 # record the current list of entries for next time
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 1741
1741 if "__main__" == __name__: 1742 if "__main__" == __name__:
1742 try: 1743 try:
1743 result = Main(sys.argv) 1744 result = Main(sys.argv)
1744 except Error, e: 1745 except Error, e:
1745 print >> sys.stderr, "Error: %s" % str(e) 1746 print >> sys.stderr, "Error: %s" % str(e)
1746 result = 1 1747 result = 1
1747 sys.exit(result) 1748 sys.exit(result)
1748 1749
1749 # vim: ts=2:sw=2:tw=80:et: 1750 # vim: ts=2:sw=2:tw=80:et:
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