diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-04-27 23:53:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-04-27 23:53:15 +0100 |
| commit | 8ed37d818f74154da3017809d275671d6a6d16bb (patch) | |
| tree | e314d900080d10dc59a660e5545c2c70cc4addf0 | |
| parent | 8009dbecfb6f818e30652d559b39272492b578f1 (diff) | |
| parent | 29052cd43a17bf4b52cc8f7ab0bfcdadcfb37fb2 (diff) | |
Merge branch 'master' of git.carlh.net:git/cdist
| -rwxr-xr-x | cdist | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -647,6 +647,7 @@ def main(): "latest": "print out the latest version", "test": "run the project's unit tests", "shell": "build the project then start a shell in its chroot", + "checkout": "check out the project", "revision": "print the head git revision number" } @@ -900,6 +901,17 @@ def main(): print command_and_read('git rev-parse HEAD').readline().strip()[:7] target.cleanup() + elif globals.command == 'checkout': + + if args.output is None: + raise Error('you must specify -o or --output') + + target = SourceTarget() + tree = globals.trees.get(args.project, args.checkout, target) + with TreeDirectory(tree): + shutil.copytree('.', args.output) + target.cleanup() + else: raise Error('invalid command %s' % globals.command) |
