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

Side by Side Diff: scm.py

Issue 504085: Add --sup_rep support to trychange.py. (Closed)
Patch Set: Created 11 years 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 | tests/gcl_unittest.py » ('j') | tests/gcl_unittest.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2009 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 """SCM-specific utility classes.""" 5 """SCM-specific utility classes."""
6 6
7 import os 7 import os
8 import re 8 import re
9 import shutil 9 import shutil
10 import subprocess 10 import subprocess
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 break 655 break
656 values[key] = value 656 values[key] = value
657 return values 657 return values
658 658
659 @staticmethod 659 @staticmethod
660 def GetCheckoutRoot(directory): 660 def GetCheckoutRoot(directory):
661 """Returns the top level directory of the current repository. 661 """Returns the top level directory of the current repository.
662 662
663 The directory is returned as an absolute path. 663 The directory is returned as an absolute path.
664 """ 664 """
665 directory = os.path.abspath(directory)
665 infos = SVN.CaptureInfo(directory, print_error=False) 666 infos = SVN.CaptureInfo(directory, print_error=False)
666 cur_dir_repo_root = infos.get("Repository Root") 667 cur_dir_repo_root = infos.get("Repository Root")
667 if not cur_dir_repo_root: 668 if not cur_dir_repo_root:
668 return None 669 return None
669 670
670 while True: 671 while True:
671 parent = os.path.dirname(directory) 672 parent = os.path.dirname(directory)
672 if (SVN.CaptureInfo(parent, print_error=False).get( 673 if (SVN.CaptureInfo(parent, print_error=False).get(
673 "Repository Root") != cur_dir_repo_root): 674 "Repository Root") != cur_dir_repo_root):
674 break 675 break
675 directory = parent 676 directory = parent
676 return directory 677 return directory
OLDNEW
« no previous file with comments | « no previous file | tests/gcl_unittest.py » ('j') | tests/gcl_unittest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698