# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 6005 | Tony Smith | Release P4Ruby 1.5953 as latest stable release | ||
//guest/tony_smith/perforce/API/Ruby/current/P4Ruby.tar.gz | |||||
#60 | 5953 | Tony Smith |
Bug fix: P4Ruby could crash attempting to parse a form when tagged mode is enabled, but form parsing was not. This only occurred when used against a 2005.2 or later server. |
||
#59 | 5944 | Tony Smith |
Changes for building P4Ruby with 2007.2 API. This change also makes p4conf.rb check that the user is using an API version we can digest. In addition, I've widened some of the gcc/g++ pattern matches to catch some build problems recently observed on some Red Hat platforms. |
||
#58 | 5897 | Tony Smith |
Remove ugly Darwin hack from P4Ruby distribution - no longer needed now that it works properly on OS X 10.4. |
||
#57 | 5806 | Tony Smith |
FreeBSD 6 porting changes. No functional change |
||
#56 | 5800 | Tony Smith |
Bug fix: P4Ruby commands could segfault on garbage collection due to uninitialized values. This change initializes them. |
||
#55 | 5795 | Tony Smith | Fix a typo in the previous change (it's just not my day) | ||
#54 | 5794 | Tony Smith | Update P4Ruby's build to 1.5794 - to include change 5793 | ||
#53 | 5792 | Tony Smith | Update P4Ruby to support 2006.2 beta API. | ||
#52 | 5791 | Tony Smith |
Add experimental support for passing a block to P4#run_resolve. The block is passed a P4::MergeData object encapsulating the context of each merge performed. The block should evaluate to a string indicating the desired result of the merge: 'ay', 'at', 'am', 's', etc. The P4::MergeData object contains information about the files involved in the merge and can invoke an external merge tool. This is still experimental at this stage so the interface may change as it evolves. |
||
#51 | 5770 | Tony Smith |
Update tarball: Cygwin tar mangles the permissions and ownership, so this one's from Linux. |
||
#50 | 5768 | Tony Smith |
Build system tweaks: sort the quoting out for Windows builds. No functional change |
||
#49 | 5693 | Tony Smith |
Update p4conf.rb to define const_char on all platforms if building against a 2006.1 or later API. Also squelched some compiler noise. No functional change |
||
#48 | 5339 | Tony Smith |
Bug fix: A typo in change 5335 introduced a bug. This just corrects the typo. Thanks to Dean Wampler <dean@aspectprogramming.com> for spotting it. |
||
#47 | 5335 | Tony Smith |
Bug fix: P4::Spec#[]= method didn't work properly when constructed without a fieldmap. In that case, the user might see this error: P4.rb:292:in `[]=': undefined method `[]' for nil:NilClass (NoMethodError) This change corrects the logic and the method now works properly. |
||
#46 | 5311 | Tony Smith |
Add new P4#api= method to allow users to lock scripts to a particular API level. This helps when upgrading to new servers that extend support for tagged output to hitherto unsupported commands (2005.2 did a lot of that). See the C/C++ API Release Notes for the full details, but by way of example, to lock scripts to the 2005.1 interface use: p4.api = 57 |
||
#45 | 5279 | Tony Smith |
Bug fix: Change 5258 (changes for 2005.2 API), broke the creation of P4::Spec objects for parsed forms. This change reworks the logic for form parsing in a way that should be compatible with all server versions (from about 2000.1 onwards) |
||
#44 | 5258 | Tony Smith |
Adapt P4Ruby for 2005.2 API changes. The 2005.2 API supplies forms ready-parsed in tagged mode and in general P4Ruby worked with it. The only issue was that P4Ruby wasn't caching the specdefs properly so conversions in the reverse direction were broken. This change ensures that we cache the specdef if we have it regardless of the API level. Squelched on a compiler warning too while I was there. |
||
#43 | 5222 | Tony Smith |
Improve debug output in P4Ruby: p4.debug = 1 * Show commands being executed p4.debug = 2 * Show function calls p4.debug = 3 * Show data p4.debug = 4 * Show ruby garbage collection calls. Debug levels are cumulative as you'd expect. |
||
#42 | 5115 | Tony Smith |
Yet another change to the build system. My guesswork on how it would work on AMD64 was wrong, and since I now have access to an Opteron box with Ruby on it, I've ported and tested it directly. Architecture detection works nicely now, and the const_char macro is correctly defined. Porting change only - no functional change |
||
#41 | 5114 | Tony Smith |
Minor update to previous two changes. I originally opted to use CONFIG[ 'target_os' ] as it contained just what I was looking for, but it's not there in Ruby 1.6 so that was out. What is there in both 1.6 and 1.8 is 'host_os', but on Linux (and possibly others) it can contain a tuple value ('linux-gnu' instead of just 'linux'). This change splits the host_os field and takes only the first part so p4conf.rb should guess correctly in more cases (I think!). |
||
#40 | 5112 | Tony Smith | Port previous change to NT (and hopefully others). | ||
#39 | 5111 | Tony Smith |
Make P4Ruby's build script support the const_char macro definition on those platforms that need it (Solaris >= 2.7 and Linux on AMD64 primarily). If we ever port P4Ruby to LinuxIA64 we'll need to add support for that too. With this change p4conf.rb tries harder to determine the O/S name and version, but it's unlikely to get it right all the time. So there's also a new '--apibuild' flag to p4conf.rb that allows the user to override the detected platform with an explicit configuration. Most people won't have to use it, but it'll be there for those that need it. I've also updated the README with the new build procedure, and added a FAQ document for the most common questions. |
||
#38 | 5105 | Tony Smith |
Make P4Ruby include the text of any errors or warnings in exception messages. Previously the user had to call P4#errors() and/or P4#warnings() to display this information and if you didn't handle P4Exception specifically the message could look somewhat cryptic. This change hopefully makes it easier - particularly for newbies. Note that the text of warnings is not shown unless you're using exception level 2 (P4::RAISE_ALL). |
||
#37 | 4942 | Tony Smith |
Add support for Unicode servers to P4Ruby. This change adds two new interfaces, P4#charset= and P4#charset? to set and get the charset respectively. |
||
#36 | 4940 | Tony Smith |
Add (undoc'd) support for enabling/disabling tagged mode on a per-command basis. Also fixed a minor typo which was rendering an error message less useful than intended. |
||
#35 | 4870 | Tony Smith |
Call ClientApi::SetProg() every time a command is run rather than only once. This makes the log entries correctly record the script name against every command that the script runs. |
||
#34 | 4841 | Tony Smith |
Bug fix. Fix stupid uninitialized integer problem with MaxScanRows and MaxResults. |
||
#33 | 4830 | Tony Smith |
Add named constants for P4Ruby's exception levels. The valid levels are: P4::RAISE_NONE -- No exceptions P4::RAISE_ERRORS -- Exceptions on errors only P4::RAISE_ALL -- Exceptions on errors and warnings Also added P4#at_exception_level( level ) { ... } method to allow you to run a block of code at a different exception level and revert to the previous level when the block completes. Thanks to Johan Nilsson. Some doc tidying along with the docs for the features above. |
||
#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) |