##// END OF EJS Templates
cmdutil: do not duplicate stdout by makefileobj()...
Yuya Nishihara -
r27419:7e2495bf default
parent child Browse files
Show More
@@ -462,11 +462,6 b' def makefileobj(repo, pat, node=None, de'
462 fp = repo.ui.fout
462 fp = repo.ui.fout
463 else:
463 else:
464 fp = repo.ui.fin
464 fp = repo.ui.fin
465 if util.safehasattr(fp, 'fileno'):
466 return os.fdopen(os.dup(fp.fileno()), mode)
467 else:
468 # if this fp can't be duped properly, return
469 # a dummy object that can be closed
470 return _unclosablefile(fp)
465 return _unclosablefile(fp)
471 if util.safehasattr(pat, 'write') and writable:
466 if util.safehasattr(pat, 'write') and writable:
472 return pat
467 return pat
@@ -140,6 +140,7 b' Exporting revision -2 to a file:'
140 No filename should be printed if stdout is specified explicitly:
140 No filename should be printed if stdout is specified explicitly:
141
141
142 $ hg export -v 1 -o -
142 $ hg export -v 1 -o -
143 exporting patch:
143 # HG changeset patch
144 # HG changeset patch
144 # User test
145 # User test
145 # Date 0 0
146 # Date 0 0
@@ -154,7 +155,6 b' No filename should be printed if stdout '
154 @@ -1,1 +1,2 @@
155 @@ -1,1 +1,2 @@
155 foo-0
156 foo-0
156 +foo-1
157 +foo-1
157 exporting patch:
158
158
159 Checking if only alphanumeric characters are used in the file name (%m option):
159 Checking if only alphanumeric characters are used in the file name (%m option):
160
160
General Comments 0
You need to be logged in to leave comments. Login now