hgext/histedit.py
changeset 19018 730614b9b352
parent 19017 c5c8613f265e
child 19020 12c06686d371
--- a/hgext/histedit.py	Tue Apr 16 16:58:25 2013 +0200
+++ b/hgext/histedit.py	Tue Apr 16 20:48:37 2013 +0200
@@ -143,6 +143,7 @@
 except ImportError:
     import pickle
 import os
+import sys
 
 from mercurial import cmdutil
 from mercurial import discovery
@@ -515,7 +516,10 @@
             f.write(rules)
             f.close()
         else:
-            f = open(rules)
+            if rules == '-':
+                f = sys.stdin
+            else:
+                f = open(rules)
             rules = f.read()
             f.close()
         rules = [l for l in (r.strip() for r in rules.splitlines())