Change 1464

tony_smith (Tony Smith)
Tony Smith committed this change into //guest/tony_smith/perforce/API/Ruby/main
Request Review
Download .zip
Add support for binary output - mainly for "p4 print binary_file".
Binary output is returned in a Ruby string. Note that due to
the fragmentation of large messages by the Perforce server,
P4#run( "print", "-q", "binfile" ) can return an array of more than
one element - each element comprising a chunk of the same file.

If you're only printing one file, then you can simply use:

p4.run_print( "-q", binfile ).join( "" )

If you're printing more than one file, you'll have to iterate
over the result array to find the file markers ( using "-q" is
a bad plan in this case ). Each file marker will be in a separate
element of the array though.
  • Files 4
  • Comments 0
4 edited 0 added 0 deleted
Changes#8
Loading...
clientuserruby.cc#8
Loading...
clientuserruby.h#7
Loading...
p4rb_version.h#12
Loading...
Tip: Use n and p to cycle through the changes.