| Index: gclient_scm.py
|
| diff --git a/gclient_scm.py b/gclient_scm.py
|
| index 8cba5409573899b343ca099da468bb9db5798285..b9625f91b90cd23398c7d82d54bcf8c2d1c3f440 100644
|
| --- a/gclient_scm.py
|
| +++ b/gclient_scm.py
|
| @@ -78,7 +78,7 @@ class SCMWrapper(object):
|
| if file_list is None:
|
| file_list = []
|
|
|
| - commands = ['cleanup', 'export', 'update', 'revert',
|
| + commands = ['cleanup', 'export', 'update', 'revert', 'revinfo',
|
| 'status', 'diff', 'pack', 'runhooks']
|
|
|
| if not command in commands:
|
| @@ -167,6 +167,10 @@ class GitWrapper(SCMWrapper):
|
| self._RunGit(['reset', '--hard', merge_base], redirect_stdout=False)
|
| file_list.extend([os.path.join(self.checkout_path, f) for f in files])
|
|
|
| + def revinfo(self, options, args, file_list):
|
| + """Display revision"""
|
| + return self._RunGit(['rev-parse', 'HEAD'])
|
| +
|
| def runhooks(self, options, args, file_list):
|
| self.status(options, args, file_list)
|
|
|
| @@ -395,6 +399,10 @@ class SVNWrapper(SCMWrapper):
|
| # exception.
|
| logging.error('Failed to update:\n%s' % str(e))
|
|
|
| + def revinfo(self, options, args, file_list):
|
| + """Display revision"""
|
| + return CaptureSVNHeadRevision(self.url)
|
| +
|
| def runhooks(self, options, args, file_list):
|
| self.status(options, args, file_list)
|
|
|
|
|