changeset 397:11ac996b9c49

make at least a pretend stub
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 30 Jul 2013 00:04:34 -0700
parents f3472dd25d9e
children 2025368488ee
files python/hg-tricks.py
diffstat 1 files changed, 20 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/python/hg-tricks.py	Mon Jul 29 22:44:30 2013 -0700
+++ b/python/hg-tricks.py	Tue Jul 30 00:04:34 2013 -0700
@@ -1,9 +1,20 @@
-# check status
-/       # check for outstanding changes
-        output = self._call(['st']).strip()
-        lines = [line for line in output.splitlines()
-                 if not line.startswith('?')]
-        if lines:
-            print "Outstanding changes:"
-            print output
-            raise AssertionError
+"""
+random collection of hg tricks in python
+"""
+
+# XXX STUB
+
+from subprocess import check_output as call
+
+### check status
+
+def changes(hg='hg')
+    """check for outstanding changes"""
+    output = call([hg, 'st']).strip()
+    lines = [line for line in output.splitlines()
+             if not line.startswith('?')]
+    if lines:
+        print "Outstanding changes:"
+        print output
+        return True
+