# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 4829 | Tony Smith | Release build 1.4809 of P4Ruby as the latest stable release. | ||
//guest/tony_smith/perforce/API/Ruby/current/P4Ruby.tar.gz | |||||
#32 | 4809 | Tony Smith |
Add P4#maxresults= and P4#maxscanrows= methods to allow you to place explicit limits on the execution of individual commands. These limits remain in force for all subsequent commands until they are removed by setting them to zero. Port of new functionality from P4Perl. |
||
#31 | 4753 | Tony Smith |
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. |
||
#30 | 4680 | Tony Smith |
Make P4Ruby return new P4::Spec objects instead of plain old hashes when parse_forms mode is in use. A P4::Spec object is derived from Hash so should be backwards compatible with previous code. P4::Spec provides limited fieldname validation on forms and accessor methods for quick and easy access to the fields in the form. The accessor methods are all prefixed with '_' to avoid colliding with methods from the Hash parent class. This is a little ugly, but deriving from hash is a big win, so it's worth it. This change also fixes a minor bug found along the way. Spec parsing and formatting wouldn't work with labels, branches, depots and groups unless you'd previously run a P4::fetch_label( <label> ), P4::fetch_branch( <branch> ) etc. etc. This is because the spec parsing code internally runs one of these commands in order to grab the specdef from the server but it wasn't providing a spec name. i.e. it was using 'p4 client -o' and assuming that this would work for other types of spec too. It does, but not for all spec types. So, now the spec parsing code will use a bogus name for the spec types that require it. |
||
#29 | 4651 | Tony Smith |
Add format_spec() method and format_* shortcuts to make it easy to convert a spec in a hash back to its string form without sending it to the server. |
||
#28 | 4636 | Tony Smith |
Bug fix: P4Ruby was segfaulting on 'p4 diff2' due to the use of 'depotFile' and 'depotFile2' variable names. Normally a variable suffixed by a number occurs when there are multiple results for a command. i.e. 'p4 -Ztag filelog' on a file with multiple revisions and/or integrations. In these cases you'll see: rev0, rev1, rev2, rev3,... action0, action1, ... and in these cases P4Ruby puts all the 'rev*' elements into an array. But in the case of diff2, there's no 'depotFile0' so P4Ruby was trying to insert depotFile2 into an array that wasn't an array. With this change, if P4Ruby finds that a name has already been defined, and the value it holds is not an array then it will simply use the name it's been given - including the numerical suffix. |
||
#27 | 4593 | Tony Smith |
Add support for 'p4 login' to P4Ruby per request from Robert Cowham. New installer to follow. |
||
#26 | 4589 | Tony Smith |
Update P4Ruby to support the new SetProg() method in the 2004.2 API. Whilst the new 'P4#prog=' method is always available, it's only functional if P4Ruby is built with a 2004.2 or later API. The build system got a bit of tidying up to support this change and the API version is now detected automatically if possible. I've also removed the --apilibdir and --apiincludedir flags as they complicate matters and I never use them and I don't believe anyone else does either. There are also some minor doc formatting tweaks to go along with the added documentation for prog=. |
||
#25 | 4587 | Tony Smith |
Support for multi-threaded use of P4Ruby. Previously, whilst you could create a multithreaded application and use P4 objects in different threads, all P4#run() method calls were serialised so there was no gain. This was because Ruby's threading model is co-operative and P4Ruby wasn't co-operating. With this change, we now call rb_thread_schedule() so multithreading works as expected. There may still be some problems with termination if an exception is raised in another thread at an inopportune moment but so far it's handled all the tests I've thrown at it. |
||
#24 | 4261 | Tony Smith |
Add support for parsing arbitrary specs from strings in Ruby space. Useful with spec depots. You might obtain the spec by running a "p4 print -q" against a file in a spec depot, but want to parse it into a Ruby hash. i.e. p4 = P4.new p4.parse_forms # Required! p4.connect buf = p4.run_print( "-q", "//specs/client/myclient" ) spec = p4.parse_client( buf ) # Or equivalently spec = p4.parse_spec( "client", buf ) |
||
#23 | 4253 | Tony Smith |
Fix bad changelist number in Changes file and update tarball. No functional change |
||
#22 | 4251 | Tony Smith |
Add support for delete_* methods to P4Ruby so you can now say: p4.delete_client( "clientname" ) instead of the old: p4.run_client( "-d", "clientname" ) Just some shorthand. Also some small changes to the setup script to allow for people who install the Perforce API in a system-wide location such as /usr/include/p4/ /usr/lib/p4/ Now the installer takes --apilibdir= and --apiincludedir= params as well as the old --apidir= |
||
#21 | 4193 | Tony Smith |
Oops. Forgot to include the README.DARWIN file... |
||
#20 | 4191 | Tony Smith | Update P4Ruby distribution to include Darwin port hacks | ||
#19 | 4136 | Tony Smith |
Porting change. Solaris 2.7 and above require an additional pre-processor definition to compile correctly |
||
#18 | 3888 | Tony Smith |
Bug fix. Off-by-one error in memory allocation. Where there were no arguments passed to P4#run(), an access violation could result. Thanks to Jeff Bowles for pointing this one out. |
||
#17 | 3579 | Tony Smith | Updated P4Ruby-1.3578 tarball. | ||
#16 | 3541 | Tony Smith |
Porting change. Now builds under Cygwin with only a few filthy hacks. New undoc'd --gccver=2 flag allows Cygwin users to build P4Ruby using the gcc-2 package rather than the default compiler which is currently gcc 3.2.3. They have to do this because the Perforce API is not yet available in a gcc-3 version for Cygwin. |
||
#15 | 2924 | Tony Smith |
Porting changes. P4Ruby now builds with gcc 3.2 |
||
#14 | 2593 | Tony Smith |
Bug fix. Form parsing failed when attempting to parse forms containing invalid select field values. Specifically a jobspec that initialised select fields to invalid values meant that you could not create a new job easily using P4Ruby. This fix ensures that the client makes no attempt to validate the form data sent by the server. It's the server's job to do the validation. |
||
#13 | 2409 | Tony Smith |
Port bug fix from P4Perl to P4Ruby. This fixes the problems with tagged mode parsing of fields whose names contain embedded numbers like P4DTI-* fields in jobs. |
||
#12 | 2408 | Tony Smith |
Build process tweak. Rename config.h to extconf.h so that it will be removed by "make distclean" as that's what mkmf expects it to be called. |
||
#11 | 2407 | Tony Smith |
Bug fix (kind of). The reuse of the variable names otherLock and otherOpen in the output of "p4 fstat" was causing P4Ruby to trash the first value of the variable in favour of the second. So for otherOpen you'd get the number of other people who have the file open, but not their names or clients. This change introduces a slightly unpleasant fix which renames the second, unindexed occurrence of the variable (i.e. otherOpen not otherOpen1) by simply appending an "s". So otherOpen becomes otherOpens and otherLock becomes otherLocks. In the case of otherOpen(s) this makes sense because the hash member otherOpen points to an array of user/client combo's for people who have the file open whilst otherOpens is the number of other people who have the file open (i.e h[ "otherOpen" ].length ). In the case of otherLock it makes slightly less sense since otherLock is normally a flag but now it's a (one-element) array containing the name & client of the locking user. otherLocks is now the flag and contains only an empty string as its value. In future it may make more sense to simply drop otherLocks and otherOpens as the array elements give you all the info you need. |
||
#10 | 2388 | Tony Smith |
Rework p4conf.rb script to improve the build process. There are now two mandatory parms and if you omit them you will be prompted for their values. --apidir <dir> - Path to the Perforce API --apiver <string> - API version string (e.g. 2002.2) I've also renamed the .so file from "P4api.so" to just P4.so and I've improved the self identification code to include the build flags and the API version to help with diagnosis. |
||
#9 | 2210 | Tony Smith |
Bug fix to change 2085 which broke form parsing as the specdef variable is only available within the context of the command being executed and the SetInput() method was trying to use it outside of any command context. That and having a bad condition in the test for its existence was causing a segvio. |
||
#8 | 2086 | Tony Smith |
Add support for capturing the output of "p4 diff" to the Ruby API interface. |
||
#7 | 2085 | Tony Smith |
Get rid of specdef hack in the Ruby API. No need to store it in the hash, just grab it from the RPC buffer when needed. |
||
#6 | 1934 | Tony Smith |
Bug fix. On some lame Linux distro's which ship with beta gcc's p4.cpp would fail to compile because of a prototype mismatch in the arguments to the rb_define_method() function (and others). This change makes use of Ruby's handy RUBY_METHOD_FUNC(func) macro to make sure the cast is always correct |
||
#5 | 1752 | Tony Smith |
Update P4/Ruby tarball to version 1.1750. The first GA release. |
||
#4 | 1725 | Tony Smith | Update P4/Ruby with support for 2002.1 API | ||
#3 | 1543 | Tony Smith | Release P4Ruby-0.1464. | ||
#2 | 1414 | Tony Smith |
Oops. Previous version of P4Ruby.tar.gz was bad - it contained some work-in-progress. This is P4/Ruby@1393 |
||
#1 | 1412 | Tony Smith | Add manifest file, and the first tarball release of P4/Ruby (1393) |