| Index: git_cl.py
|
| diff --git a/git_cl.py b/git_cl.py
|
| index c43b62106110ac5a351f6cf5bcbfcb557d04da02..07cda7fa6d335244f2bc81db19ee107f8f35e778 100755
|
| --- a/git_cl.py
|
| +++ b/git_cl.py
|
| @@ -97,9 +97,14 @@ def GetNoGitPagerEnv():
|
|
|
| def RunCommand(args, error_ok=False, error_message=None, shell=False, **kwargs):
|
| try:
|
| - return subprocess2.check_output(args, shell=shell, **kwargs)
|
| + out = subprocess2.check_output(args, shell=shell, **kwargs)
|
| + logging.debug('output of %s is\n%s\n', args,
|
| + '\n'.join(' ' + l for l in out.splitlines()))
|
| + return out
|
| except subprocess2.CalledProcessError as e:
|
| logging.debug('Failed running %s', args)
|
| + logging.debug('output of %s is\n%s\n', args,
|
| + '\n'.join(' ' + l for l in e.stdout.splitlines()) if e.stdout else '')
|
| if not error_ok:
|
| DieWithError(
|
| 'Command "%s" failed.\n%s' % (
|
| @@ -123,9 +128,13 @@ def RunGitWithCode(args, suppress_stderr=False):
|
| env=GetNoGitPagerEnv(),
|
| stdout=subprocess2.PIPE,
|
| stderr=stderr)
|
| + logging.debug('output of %s is\n%s\n', args,
|
| + '\n'.join(' ' + l for l in out.splitlines()))
|
| return code, out
|
| except subprocess2.CalledProcessError as e:
|
| logging.debug('Failed running %s', args)
|
| + logging.debug('output of %s is\n%s\n', args,
|
| + '\n'.join(' ' + l for l in e.stdout.splitlines()) if e.stdout else '')
|
| return e.returncode, e.stdout
|
|
|
|
|
| @@ -2024,6 +2033,7 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase):
|
| # Look for dependent patchsets. See crbug.com/480453 for more details.
|
| remote, upstream_branch = self.FetchUpstreamTuple(self.GetBranch())
|
| upstream_branch = ShortBranchName(upstream_branch)
|
| + logging.debug('remote: %s, upstream: %s', remote, upstream_branch)
|
| if remote is '.':
|
| # A local branch is being tracked.
|
| local_branch = upstream_branch
|
| @@ -2036,9 +2046,13 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase):
|
| auth_config = auth.extract_auth_config_from_options(options)
|
| branch_cl = Changelist(branchref='refs/heads/'+local_branch,
|
| auth_config=auth_config)
|
| + logging.debug('upstream cl: Gerrit=%s', branch_cl.IsGerrit())
|
| branch_cl_issue_url = branch_cl.GetIssueURL()
|
| branch_cl_issue = branch_cl.GetIssue()
|
| branch_cl_patchset = branch_cl.GetPatchset()
|
| + logging.debug('upstream cl: url %s issue %s pachset %s',
|
| + branch_cl_issue_url, branch_cl_issue , branch_cl_patchset)
|
| +
|
| if branch_cl_issue_url and branch_cl_issue and branch_cl_patchset:
|
| upload_args.extend(
|
| ['--depends_on_patchset', '%s:%s' % (
|
|
|