-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjet.py
59 lines (54 loc) · 1.12 KB
/
jet.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import sys
from jet_files import (
status,
push,
pull,
list_commits,
commit_changeset,
init,
add,
merge,
help_text,
local_tests,
login,
revert,
hook,
branch,
diff,
conflicts,
setup,
stash
)
commands = {
"add": add.run,
"push": push.run,
"pull": pull.run,
"commit": commit_changeset.run,
"merge": merge.run,
"status": status.run,
"init": init.run,
"help": help_text.run,
"list": list_commits.run,
"test": local_tests.run,
"login": login.run,
"hook": hook.run,
"branch": branch.run,
"revert": revert.run,
"switch": branch.switch,
"branches": branch.display,
"diff": diff.run,
"delete": branch.delete_branch,
"resolve": conflicts.resolve,
"conflicts": conflicts.list_conflicts,
"setup": setup.run,
"clone": pull.clone,
"stash": stash.run,
"unstash": stash.unstash,
}
try:
commands[sys.argv[1]]()
except KeyError:
print ("Invalid Command - Please see www.jetvc.co.uk/documentation/ "
"for more info!")
except IndexError, e:
print ("Not enough arguments")