def GetRietveldPatchsetNumber(): try: return GIT.Capture( ['config', 'branch.%s.rietveldpatchset' % GIT.GetBranch('.')], '.').strip() except subprocess2.CalledProcessError: return None
def GetRietveldIssueNumber(): try: return GIT.Capture( ['config', 'branch.%s.rietveldissue' % GIT.GetBranch(None)]) except subprocess2.CalledProcessError: return None
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))
def GetRietveldServerUrl(): try: return GIT.Capture(['config', 'rietveld.server'], '.').strip() except subprocess2.CalledProcessError: return None
def chromiumSrcRoot(): root = GIT.GetCheckoutRoot('.') parent_path, leaf_path = os.path.split(root) if leaf_path == 'WebKit': root = GIT.GetCheckoutRoot(parent_path) return root