summaryrefslogtreecommitdiffstats
path: root/subcmds/diffmanifests.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@google.com>2023-09-29 11:04:49 -0400
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-10-31 16:03:54 +0000
commitb32ccbb66bb16965ecb8b4e266c4e45186636c1b (patch)
tree1c1eda32af709f0cbf822de56f696ccd531ce6de /subcmds/diffmanifests.py
parentb99272c601bc5f466c3cfc782bb852c2c967ad27 (diff)
downloadgit-repo-b32ccbb66bb16965ecb8b4e266c4e45186636c1b.tar.gz
cleanup: Update codebase to expect Python 3.6
- Bump minimum version to Python 3.6. - Use f-strings in a lot of places. Change-Id: I2aa70197230fcec2eff8e7c8eb754f20c08075bb Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389034 Tested-by: Jason R. Coombs <jaraco@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Jason R. Coombs <jaraco@google.com>
Diffstat (limited to 'subcmds/diffmanifests.py')
-rw-r--r--subcmds/diffmanifests.py24
1 files changed, 6 insertions, 18 deletions
diff --git a/subcmds/diffmanifests.py b/subcmds/diffmanifests.py
index b446dbd8..88b697b6 100644
--- a/subcmds/diffmanifests.py
+++ b/subcmds/diffmanifests.py
@@ -87,25 +87,17 @@ synced and their revisions won't be found.
87 def _printRawDiff(self, diff, pretty_format=None, local=False): 87 def _printRawDiff(self, diff, pretty_format=None, local=False):
88 _RelPath = lambda p: p.RelPath(local=local) 88 _RelPath = lambda p: p.RelPath(local=local)
89 for project in diff["added"]: 89 for project in diff["added"]:
90 self.printText( 90 self.printText(f"A {_RelPath(project)} {project.revisionExpr}")
91 "A %s %s" % (_RelPath(project), project.revisionExpr)
92 )
93 self.out.nl() 91 self.out.nl()
94 92
95 for project in diff["removed"]: 93 for project in diff["removed"]:
96 self.printText( 94 self.printText(f"R {_RelPath(project)} {project.revisionExpr}")
97 "R %s %s" % (_RelPath(project), project.revisionExpr)
98 )
99 self.out.nl() 95 self.out.nl()
100 96
101 for project, otherProject in diff["changed"]: 97 for project, otherProject in diff["changed"]:
102 self.printText( 98 self.printText(
103 "C %s %s %s" 99 f"C {_RelPath(project)} {project.revisionExpr} "
104 % ( 100 f"{otherProject.revisionExpr}"
105 _RelPath(project),
106 project.revisionExpr,
107 otherProject.revisionExpr,
108 )
109 ) 101 )
110 self.out.nl() 102 self.out.nl()
111 self._printLogs( 103 self._printLogs(
@@ -118,12 +110,8 @@ synced and their revisions won't be found.
118 110
119 for project, otherProject in diff["unreachable"]: 111 for project, otherProject in diff["unreachable"]:
120 self.printText( 112 self.printText(
121 "U %s %s %s" 113 f"U {_RelPath(project)} {project.revisionExpr} "
122 % ( 114 f"{otherProject.revisionExpr}"
123 _RelPath(project),
124 project.revisionExpr,
125 otherProject.revisionExpr,
126 )
127 ) 115 )
128 self.out.nl() 116 self.out.nl()
129 117