Show More
@@ -233,7 +233,8 b' def make_file(repo, pat, node=None,' | |||||
233 | writable = 'w' in mode or 'a' in mode |
|
233 | writable = 'w' in mode or 'a' in mode | |
234 |
|
234 | |||
235 | if not pat or pat == '-': |
|
235 | if not pat or pat == '-': | |
236 |
|
|
236 | fp = writable and sys.stdout or sys.stdin | |
|
237 | return os.fdopen(os.dup(fp.fileno()), mode) | |||
237 | if hasattr(pat, 'write') and writable: |
|
238 | if hasattr(pat, 'write') and writable: | |
238 | return pat |
|
239 | return pat | |
239 | if hasattr(pat, 'read') and 'r' in mode: |
|
240 | if hasattr(pat, 'read') and 'r' in mode: |
@@ -73,8 +73,8 b' test generic hooks' | |||||
73 | [1] |
|
73 | [1] | |
74 | $ hg cat b |
|
74 | $ hg cat b | |
75 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] |
|
75 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] | |
|
76 | b | |||
76 | post-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] HG_RESULT=0 |
|
77 | post-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] HG_RESULT=0 | |
77 | b |
|
|||
78 |
|
78 | |||
79 | $ cd ../b |
|
79 | $ cd ../b | |
80 | $ hg pull ../a |
|
80 | $ hg pull ../a |
General Comments 0
You need to be logged in to leave comments.
Login now