瀏覽代碼

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>
Diogo Ferreira 6 年之前
父節點
當前提交
e4d20372b2
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      subcmds/info.py

+ 4 - 0
subcmds/info.py

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