Mercurial > hg > config
comparison python/hg-tricks.py @ 397:11ac996b9c49
make at least a pretend stub
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 30 Jul 2013 00:04:34 -0700 |
parents | a25eb7e42889 |
children |
comparison
equal
deleted
inserted
replaced
396:f3472dd25d9e | 397:11ac996b9c49 |
---|---|
1 # check status | 1 """ |
2 / # check for outstanding changes | 2 random collection of hg tricks in python |
3 output = self._call(['st']).strip() | 3 """ |
4 lines = [line for line in output.splitlines() | 4 |
5 if not line.startswith('?')] | 5 # XXX STUB |
6 if lines: | 6 |
7 print "Outstanding changes:" | 7 from subprocess import check_output as call |
8 print output | 8 |
9 raise AssertionError | 9 ### check status |
10 | |
11 def changes(hg='hg') | |
12 """check for outstanding changes""" | |
13 output = call([hg, 'st']).strip() | |
14 lines = [line for line in output.splitlines() | |
15 if not line.startswith('?')] | |
16 if lines: | |
17 print "Outstanding changes:" | |
18 print output | |
19 return True | |
20 |