Example #1
0
def GetRietveldPatchsetNumber():
    try:
        return GIT.Capture(
            ['config',
             'branch.%s.rietveldpatchset' % GIT.GetBranch('.')], '.').strip()
    except subprocess2.CalledProcessError:
        return None
Example #2
0
def GetRietveldIssueNumber():
    try:
        return GIT.Capture(
            ['config',
             'branch.%s.rietveldissue' % GIT.GetBranch(None)])
    except subprocess2.CalledProcessError:
        return None
Example #3
0
def generateDiff(path_to_write, chromium_src_root):
  """Create the diff file to send to the try server. We prepend the WebKit
  revision to the beginning of the diff so we can patch against ToT or other
  versions of WebKit."""
  diff_lines = ['third_party/WebKit@HEAD\n']

  raw_diff = GIT.GenerateDiff(os.path.join(chromium_src_root,
      'third_party/WebKit'), full_move=True).splitlines(True)
  diff_lines.extend(trychange.GetMungedDiff('third_party/WebKit',
      raw_diff)[0])

  open(path_to_write, 'wb').write(''.join(diff_lines))
Example #4
0
def GetRietveldServerUrl():
    try:
        return GIT.Capture(['config', 'rietveld.server'], '.').strip()
    except subprocess2.CalledProcessError:
        return None
Example #5
0
def chromiumSrcRoot():
  root = GIT.GetCheckoutRoot('.')
  parent_path, leaf_path = os.path.split(root)
  if leaf_path == 'WebKit':
    root = GIT.GetCheckoutRoot(parent_path)
  return root