From cac08dbf68cc571c1fd68c5fb7b8e5ef260a085d Mon Sep 17 00:00:00 2001 From: Gavin Mak Date: Thu, 29 Feb 2024 21:57:24 +0000 Subject: [PATCH] Implement UpstreamBranch in Change class This method was moved to GitChange in https://crrev.com/c/5286636 but should be implemented for all Change classes for CheckPatchFormatted. Bug: 323243527 Change-Id: Iafdf8be2f402a93cfe7285cb5e7d0d1e01cca049 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5332873 Reviewed-by: Josip Sokcevic Commit-Queue: Gavin Mak --- presubmit_support.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/presubmit_support.py b/presubmit_support.py index dedb01152..71dfb099f 100755 --- a/presubmit_support.py +++ b/presubmit_support.py @@ -1332,6 +1332,13 @@ class Change(object): def TBR(self): return ','.join(self.TBRsFromDescription()) + def UpstreamBranch(self): + """Returns the upstream branch for the change. + + This is only applicable to Git changes. + """ + return None + def AllFiles(self, root=None): """List all files under source control in the repo.""" raise NotImplementedError()