[Pkg-bazaar-commits] ./bzr-gtk/unstable r491: Merge patch to support - for stdin on ghandle-patch
Aaron Bentley
aaron at aaronbentley.com
Fri Apr 10 07:44:43 UTC 2009
------------------------------------------------------------
revno: 491
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzr-gtk
timestamp: Wed 2008-05-21 22:22:38 -0400
message:
Merge patch to support - for stdin on ghandle-patch
modified:
__init__.py
------------------------------------------------------------
revno: 478.1.1
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzr-gtk
timestamp: Wed 2008-05-07 21:36:24 +1200
message:
ghandle-patch accepts '-' for stdin
modified:
__init__.py
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2008-05-05 18:18:08 +0000
+++ b/__init__.py 2008-05-22 02:22:38 +0000
@@ -707,7 +707,10 @@
try:
from bzrlib.plugins.gtk.diff import (DiffWindow,
MergeDirectiveWindow)
- lines = open(path, 'rb').readlines()
+ if path == '-':
+ lines = sys.stdin.readlines()
+ else:
+ lines = open(path, 'rb').readlines()
lines = [l.replace('\r\n', '\n') for l in lines]
try:
directive = merge_directive.MergeDirective.from_lines(lines)
More information about the Pkg-bazaar-commits
mailing list