Commit 56f4c474 authored by supersat@chromium.org's avatar supersat@chromium.org

Reverted accidental commit

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112766 0039d316-1c4b-4281-b951-d872f2087c98
parent e8043d11
...@@ -500,7 +500,7 @@ or verify this branch is set up to track another (via the --track argument to ...@@ -500,7 +500,7 @@ or verify this branch is set up to track another (via the --track argument to
name = RunCommand(['git', 'rev-parse', 'HEAD']).strip() name = RunCommand(['git', 'rev-parse', 'HEAD']).strip()
# Need to pass a relative path for msysgit. # Need to pass a relative path for msysgit.
try: try:
files = scm.GIT.CaptureStatus(root, [root], upstream_branch) files = scm.GIT.CaptureStatus([root], upstream_branch)
except subprocess2.CalledProcessError: except subprocess2.CalledProcessError:
DieWithError( DieWithError(
('\nFailed to diff against upstream branch %s!\n\n' ('\nFailed to diff against upstream branch %s!\n\n'
......
...@@ -102,14 +102,14 @@ class GIT(object): ...@@ -102,14 +102,14 @@ class GIT(object):
['git'] + args, stderr=subprocess2.PIPE, **kwargs) ['git'] + args, stderr=subprocess2.PIPE, **kwargs)
@staticmethod @staticmethod
def CaptureStatus(cwd, files, upstream_branch=None): def CaptureStatus(files, upstream_branch=None):
"""Returns git status. """Returns git status.
@files can be a string (one file) or a list of files. @files can be a string (one file) or a list of files.
Returns an array of (status, file) tuples.""" Returns an array of (status, file) tuples."""
if upstream_branch is None: if upstream_branch is None:
upstream_branch = GIT.GetUpstreamBranch(cwd) upstream_branch = GIT.GetUpstreamBranch(os.getcwd())
if upstream_branch is None: if upstream_branch is None:
raise gclient_utils.Error('Cannot determine upstream branch') raise gclient_utils.Error('Cannot determine upstream branch')
command = ['diff', '--name-status', '-r', '%s...' % upstream_branch] command = ['diff', '--name-status', '-r', '%s...' % upstream_branch]
......
...@@ -279,8 +279,7 @@ class GIT(SCM): ...@@ -279,8 +279,7 @@ class GIT(SCM):
logging.info("GIT(%s)" % self.checkout_root) logging.info("GIT(%s)" % self.checkout_root)
def CaptureStatus(self): def CaptureStatus(self):
return scm.GIT.CaptureStatus(self.checkout_root, return scm.GIT.CaptureStatus(self.checkout_root.replace(os.sep, '/'),
self.checkout_root.replace(os.sep, '/'),
self.diff_against) self.diff_against)
def GenerateDiff(self): def GenerateDiff(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment