diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-10-17 09:39:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-10-17 09:39:14 +0100 |
| commit | 6e0f50df5a75ed39c0fd2cf4a61c9ed28c30b8d8 (patch) | |
| tree | 613b871be7b6a2e5b3f5a980c0ee76d0d5661df5 | |
| parent | 30892a4040068b3f35c0113295c19c8453544db2 (diff) | |
Add revision command.
| -rwxr-xr-x | cdist | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -770,5 +770,12 @@ elif args.command == 'shell': target = target_factory(args.target, args.debug, args.work) target.command('bash') +elif args.command == 'revision': + + target = SourceTarget() + project.checkout(target) + print command_and_read('git rev-parse HEAD').readline().strip()[:7] + target.cleanup() + else: raise Error('invalid command %s' % args.command) |
