Change 4753

tony_smith (Tony Smith)
Tony Smith committed this change into //guest/tony_smith/perforce/API/Ruby
Request Review
Download .zip
Add support for executing commands which prompt the user for input
more than once during their execution. A perfect example is
'p4 password' which prompts the user three times. This works
by allowing P4#input() to take an array argument. Each time
Perforce prompts the user (by calling ClientUserRuby::Prompt()),
the array is shifted by one and the first value in the array
is passed to Perforce. Thus, to change your password a
three-element array is needed comprising of your old password, and
the new password twice.

To make this a little easier on the eye, this change also includes
a thin wrapper called P4#run_password() which takes simply the old
password and the new password and constructs a suitable input
array.

This change also includes docs for the above, and docs for
P4#run_filelog() which were found to be missing.
  • Files 6
  • Comments 0
6 edited 0 added 0 deleted
current/P4Ruby.tar.gz#31
Loading...
main/Changes#37
Loading...
main/clientuserruby.cpp#14
Loading...
main/doc/P4.html#13
Loading...
main/lib/P4.rb#18
Loading...
main/p4rb_version.h#39
Loading...
Tip: Use n and p to cycle through the changes.