forked from stacked-git/stgit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stg
executable file
·41 lines (30 loc) · 1.16 KB
/
stg
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
#!/usr/bin/env python3
import os
import sys
__copyright__ = """
Copyright (C) 2005, Catalin Marinas <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see http://www.gnu.org/licenses/.
"""
if __name__ == '__main__':
if sys.version_info[:2] < (3, 5):
sys.stderr.write('StGit requires Python >= 3.5\n')
sys.exit(1)
if os.environ.get('COVERAGE_PROCESS_START'):
import sys
import coverage
if len(sys.argv) < 2 or sys.argv[1].startswith('-'):
context = 'stg'
else:
context = 'stg-' + sys.argv[1]
cov = coverage.process_startup()
cov.switch_context(context)
from stgit.main import main
main()