diff options
| author | Shawn O. Pearce <sop@google.com> | 2011-11-29 15:01:33 -0800 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2011-11-29 15:02:15 -0800 |
| commit | ecff4f17b08f791466b73d935c772de57f2257e6 (patch) | |
| tree | 44b8e4a958369d33a7e46a8a5d629b2c1486feec | |
| parent | cc14fa9820a4c9fb7a403bbe1264856c6437bf96 (diff) | |
| download | git-repo-ecff4f17b08f791466b73d935c772de57f2257e6.tar.gz | |
Describe the repo launch version in `repo version`
repo version v1.7.8
(from https://android.googlesource.com/tools/repo.git)
repo launcher version 1.14
(from /home/sop/bin/repo)
git version 1.7.8.rc2.256.gcc761
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
Change-Id: Ifcbe5b0e226a1a6ca85455eb62e4da5e9a0f0ca0
| -rwxr-xr-x | main.py | 4 | ||||
| -rw-r--r-- | subcmds/version.py | 8 |
2 files changed, 12 insertions, 0 deletions
| @@ -36,6 +36,7 @@ from git_config import init_ssh, close_ssh | |||
| 36 | from command import InteractiveCommand | 36 | from command import InteractiveCommand |
| 37 | from command import MirrorSafeCommand | 37 | from command import MirrorSafeCommand |
| 38 | from command import PagedCommand | 38 | from command import PagedCommand |
| 39 | from subcmds.version import Version | ||
| 39 | from editor import Editor | 40 | from editor import Editor |
| 40 | from error import DownloadError | 41 | from error import DownloadError |
| 41 | from error import ManifestInvalidRevisionError | 42 | from error import ManifestInvalidRevisionError |
| @@ -334,6 +335,9 @@ def _Main(argv): | |||
| 334 | _CheckWrapperVersion(opt.wrapper_version, opt.wrapper_path) | 335 | _CheckWrapperVersion(opt.wrapper_version, opt.wrapper_path) |
| 335 | _CheckRepoDir(opt.repodir) | 336 | _CheckRepoDir(opt.repodir) |
| 336 | 337 | ||
| 338 | Version.wrapper_version = opt.wrapper_version | ||
| 339 | Version.wrapper_path = opt.wrapper_path | ||
| 340 | |||
| 337 | repo = _Repo(opt.repodir) | 341 | repo = _Repo(opt.repodir) |
| 338 | try: | 342 | try: |
| 339 | try: | 343 | try: |
diff --git a/subcmds/version.py b/subcmds/version.py index 83e77d0b..03195f88 100644 --- a/subcmds/version.py +++ b/subcmds/version.py | |||
| @@ -19,6 +19,9 @@ from git_command import git | |||
| 19 | from project import HEAD | 19 | from project import HEAD |
| 20 | 20 | ||
| 21 | class Version(Command, MirrorSafeCommand): | 21 | class Version(Command, MirrorSafeCommand): |
| 22 | wrapper_version = None | ||
| 23 | wrapper_path = None | ||
| 24 | |||
| 22 | common = False | 25 | common = False |
| 23 | helpSummary = "Display the version of repo" | 26 | helpSummary = "Display the version of repo" |
| 24 | helpUsage = """ | 27 | helpUsage = """ |
| @@ -31,5 +34,10 @@ class Version(Command, MirrorSafeCommand): | |||
| 31 | 34 | ||
| 32 | print 'repo version %s' % rp.work_git.describe(HEAD) | 35 | print 'repo version %s' % rp.work_git.describe(HEAD) |
| 33 | print ' (from %s)' % rem.url | 36 | print ' (from %s)' % rem.url |
| 37 | |||
| 38 | if Version.wrapper_path is not None: | ||
| 39 | print 'repo launcher version %s' % Version.wrapper_version | ||
| 40 | print ' (from %s)' % Version.wrapper_path | ||
| 41 | |||
| 34 | print git.version().strip() | 42 | print git.version().strip() |
| 35 | print 'Python %s' % sys.version | 43 | print 'Python %s' % sys.version |
