info: Add the manifest revision

After Ib546f5ebbc8a23875fbd14bf166fbe95b7dd244e, repo info now displays
the current project revision in the 'Current revision' field.

While the output is more consistent, there are use cases for the
revision expression as shown in the manifest. This patch re-adds the
manifest revision as a new 'Manifest revision' field.

Change-Id: I50c1559dcb7ceb69af07352b956d78f85b8f592e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/240799
Tested-by: Diogo Ferreira <deovferreira@gmail.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Diogo Ferreira 2019-10-14 16:28:46 +01:00 committed by Mike Frysinger
parent 1e01a74445
commit e4d20372b2

View File

@ -103,6 +103,10 @@ class Info(PagedCommand):
self.headtext(currentBranch) self.headtext(currentBranch)
self.out.nl() self.out.nl()
self.heading("Manifest revision: ")
self.headtext(p.revisionExpr)
self.out.nl()
localBranches = list(p.GetBranches().keys()) localBranches = list(p.GetBranches().keys())
self.heading("Local Branches: ") self.heading("Local Branches: ")
self.redtext(str(len(localBranches))) self.redtext(str(len(localBranches)))