Changes #26

  • //
  • guest/
  • tony_smith/
  • perforce/
  • API/
  • Perl/
  • P4-Client/
  • Changes
  • View
  • Commits
  • Open Download .zip Download (10 KB)
Revision history for Perl extension P4::Client.
2.4319 Wed Jun 09 2004

      - Porting change for Cygwin. Update hints file to support the use of
        gcc3 to build P4Perl on Cygwin. This requires the 2003.2 Cygwin
	API. Thanks to Jeremy Bopp.
        
2.4259 Wed Apr 07 2004

      - Porting change for Solaris 8/9 and later. Improved hints file to make
        sure that const_char gets defined as "const char" not "char".

2.3552 Wed Aug 06 2003

      - Add support for OutputBinary to P4::UI class so we can support
        "p4 print" of binary files or text files on clients with non-native
	line termination

2.3540 Tue Aug 05 2003

      - Add hints file for Cygwin build contributed by Nathan Royer
	<nroyer@sirf.com>. No functional change

2.2596 Tue Jan 14 2003

      - Allow form parsing to accept forms deliberately initialised with
        invalid data. 

2.2411 Wed Nov 27 2002

      -	Port bug fix from P4Ruby to P4Perl. Certain variable names get
	reused in tagged mode and this causes the hash members to lose
	their earlier contents when the later value comes along. Specifically
	this is otherLock and otherOpen in the output of "p4 fstat". This
	slightly unpleasant fix simply renames the later variable name by
	appending an "s" to it. So otherLock becomes otherLocks and otherOpen
	becomes otherOpens. 
	
	Now otherOpen is an array containing the user/client of the other 
	users who have the file open and otherLock is a single-element
	array containing the user/client of the user who has the file locked.
	
	otherOpens contains the number of other users who have the file
	opened.
	
	otherLocks contains an empty string.
	
	Since the latter two are quite redundant they may be explicitly 
	removed in a future release.

      - Fix bogus output of P4::UI::OutputStat - it was producing some 
        duplicate output.
	
2.2373 Tue Nov 19 2002
	- Bug fix. Tagged mode was not handling fields with embedded numbers
	  in their name (like P4DTI-*) well. Thanks to ravi narayan.

2.2279 Fri Oct 25 2002
        - Bumped version to 2.2279 to make CPAN.pm get people the latest
	  version. It thought that 1.977 was the latest release!

	  No functional change.

1.2223 Fri Oct 15 2002
	- Relegate diff support added in 1.1976 to the bottom drawer. It's
	  still there if you really want it but you must call 

	     $client->DoPerlDiffs();

	  to specify your preference. The new implementation uses the Diff
	  class provided by the P4 client API to perform the diff and just
	  pushes the output out through the P4::UI::OutputText() interface.
	  This means you will always get the same output as "p4 diff" 
	  because it's using the same classes, and you don't need to install
	  any extra Perl modules to get diff support.

1.2084 Fri Sep 06 2002
	- Removed ugly hack preserving the specdef in perl hashes. There's
          no need for it as the server kindly provides it when you run
          the "p4 XXX -i".
	
	- A little tidying of the test harness. It's not great, but there's
	  at least something in there to check the form parsing now.

1.2010 Fri Aug 09 2002
	- Bug fix. When using ParseForms() mode, if a user inserts a hash or
	  an object into the spec before calling SetInput() a crash could
	  occur. It's a stupid thing to do, but it should not cause a crash.
	  P4-Client is now stricter about what it will accept and will reject
	  blessed references as form members altogether. Passing an array which
	  contains a hash or other such structures will also now get you 
	  nowhere.

1.1980 Mon Jul 29 2002
	- Port to ActivePerl > 623. Convert all fprintf's to just plain old
	  printf to avoid PerlIO mess. Include math.h early on Win32 to 
	  prevent it being included with C++ linkage.

1.1976 Thu Jul 25 2002
	- Add support for ClientUser::Diff() to P4-Client. Thanks to
	  Wilson Snyder (wsnyder@wsnyder.org).

1.1894 Mon Jun 17 2002
	- Fix bug introduced in 1.1711. Thanks to Jon Bjornstad. 

1.1711 Fri Apr 26 2002
	- Make P4::Client::SetCwd() both change the working directory, and
	  update the PWD environment variable.  This makes sure that
	  P4CONFIG files in or above the target directory will be correctly
	  loaded.

1.1692 Wed Apr 24 2002
	- Explicitly add -D_BSD_SOURCE and -D_SVID_SOURCE to build on
	  Linux as some ActiveState and Red Hat builds inexplicably omit
	  them. 

1.1615 Wed Apr 03 2002
	- Add debugging support to the ClientUserPerl class so that 
	  we can see what's going on during tagged output parsing.

1.1546 Fri Mar 15 2002
	- Fix to yesterdays release. Two of the debugging statements added
	  yesterday were not protected by conditions. This release corrects
	  that behaviour.

1.1542 Thu Mar 14 2002
	- Correct error message in Client.xs which still referred to old
	  ClientApi class. Now uses the correct name "P4::Client::Run"

	- Made debugging available at run time, not just compile time. New 
	  method DebugLevel() added to allow users to get/set the debug level. 
	  Anything non-zero enables debug output which goes to stdout.

1.1515  Wed Mar 06 2002
	- Bug fix. Make sure that perl header files are included with
	  C linkage, not default of C++. This caused problems on some
	  platforms with the redefinition of the Perl_malloc() etc.
	  functions with different linkage.

1.1084	Fri Nov 16 2001
	- Fix memory management in tagged mode. Reference counts
	  were not being incremented when converting the structured
	  hashes into a Perforce form for use as input to a subsequent
	  command.

1.1050  Wed Nov 07 2001
	- Fix for complex tagged output which contains more than one level
	  of nested data. e.g. "how0,0", "how0,1" etc. in the output of
	  "p4 filelog". P4-Client can now handle any number of levels of 
	  nested data in tagged responses from the Perforce server. It does
	  not however accept such complex structures as input for conversion
	  into Perforce forms. I think that's OK as no Perforce forms
	  contain nested structures and are unlikely to.

1.977	Mon Oct 22 2001
	- Fix broken form parsing. specdef was not getting saved so 
	  forms could not be reconstructed from a hash. Also added
	  support for reconstructing spec's from multi-line form elements
	  stored in Perl arrays.

1.976	Mon Oct 22 2001
	- Fix for bug in multi-line form element handling reported by
	  Michael Keirnan <mgk@atg.com>

1.966	Fri Oct 19 2001
	- Fix dodgy UI.pm in previous release. 

1.964	Fri Oct 19 2001
	- Multi-line elements within forms are now presented as arrays
	  within the hashref returned to the caller. So instead of
	  $href->{ View2 }, you now use $href->{ View }->[ 2 ]. Yes, it's
	  more verbose, but it means you can grab an array of related 
	  elements.
	- Added Solaris support contributed by Jeremy Russell 
	  <jrussel@reshape.com> with a few tweaks.

1.931   Fri Oct 05 2001 (busy day)
	- Support for form parsing when using the tag and specstring 
	  protocol options. When both these options are in effect, the
	  data is returned to the caller as a hash containing the parsed
	  form in key => value format.
	  
1.923	Fri Oct 05 2001
	- Better documentation on P4::UI class.
	- UI::OutputText() now respects the length parameter
	- Members of the hashref passed to OutputStat are no longer
	  mortal so that they will persist after OutputStat returns if
	  they are referenced by user code.
	- UI::OutputError() now blurts to stderr instead of stdout which
	  it should have from the start.
	- Win32 UI::Edit() now invokes notepad if nothing better has been
	  specified.
	
0.52  Thu Apr 05 2001
	- Fix by Gurusamy Sarathy <gsar@activestate.com> to
	  P4::Client::GetCwd(). 
	- Fixed minor bugs in UI.pm. Module now returns true on load and
	  new is no longer exported into the namespace of the caller (duh!)
	- Added an example script to help get people started.

0.51  Thu Feb 08
	- Ported to Win32 ( well Windows 2000 anyway )
	- Fixed building on Threaded perls like ActivePerl

0.50  Thu Jan 25
	- Renamed P4::ClientApi to P4::Client.

0.05  Mon Jan 15
	- Added AUTOLOAD functionality for Run method so that the 
	  Perforce commands can be used as methods directly. Also
	  pared down the export list as we don't want to export
	  anything at all.

	- First publicly available version released under BSD-like 
	  licence.

0.04  Thu Jan 11
	- Back ported to 5.005_003 and ported to FreeBSD. Now works on 
	  Linux and FreeBSD on perl 5.005_003 and perl 5.6.0

0.03  Fri Jan 5
	- Added in some features to make it easier to back port to
	  versions of Perl prior to 5.6. Still won't work on these older
	  versions though.

	- Massive rework. Now each instance of a P4::ClientApi object
	  has its own Error object and counts the Init and Final calls
	  so that destruction is clean. The object is now a blessed 
	  hash and the pointers are stored as IV members of the hash.
	  This means you can now declare and use as many P4::ClientApi
	  objects as you want without them treading on each others toes.
	  Should be thread-safe too, but that's not been tested.

	- Tweaked Makefile.PL so that the nasty bits of the build are
	  mostly in the hints file. Should make porting a bit easier

0.02  Thu Jan  4 
	- Added support for numeric arguments to P4::ClientApi::Run() to
	  make life easier on callers

	- Cleaned up destructor code to make it call ClientApi->Final() if
	  the number of initialisations exceeds the number of calls to
	  Final(). This prevents hangs when the object is destroyed without
	  calling Final() at the cost of ruining what little thread safety
	  we had ( not much ).

	- At the moment you can only have one P4::ClientApi object in
	  client programs. Yuk.

	- Improved documentation

0.01  Tue Jan  2
	- original version; 

	- Contains basic support for running p4 commands through 
	  the API. 
# Change User Description Committed
#26 4319 Tony Smith Update Cygwin hints file to handle gcc3 builds using the 2003.2
API. Thanks to Jeremy Bopp.
#25 4259 Tony Smith Porting change.
Improved solaris hints file for Solaris 8/9 (and
hopefully later releases too).

No functional change
#24 3552 Tony Smith Release previous bugfix from a platform that can build a decent
tarball...
#23 3551 Tony Smith Minor bugfix to previous change.
The reverse of :binary is
:crlf not :text. See perldoc PerlIO for more info on this
arcane interface...
#22 3550 Tony Smith Add OutputBinary() support to P4Perl.
This allows "p4 print" to
work with clients that do not use "local" line endings amongst
other things.
#21 3540 Tony Smith Add hints file for Cygwin contributed by Nathan Royer - thanks
Nathan!
#20 2596 Tony Smith Bug fix: Allow form parsing to accept forms that are initialised
(deliberately) with invalid data.
#19 2411 Tony Smith Port bug fix from P4Ruby to P4Perl.
Certain variable names get
reused in tagged mode and this causes the hash members to lose
their earlier contents when the later value comes along. Specifically
this is otherLock and otherOpen in the output of "p4 fstat". This
slightly unpleasant fix simply renames the later variable name by
appending an "s" to it. So otherLock becomes otherLocks and otherOpen
becomes otherOpens.

Now otherOpen is an array containing the user/client of the other
users who have the file open and otherLock is a single-element
array containing the user/client of the user who has the file locked.

otherOpens contains the number of other users who have the file
opened.

otherLocks contains an empty string.

Since the latter two are quite redundant they may be explicitly
removed in a future release.
#18 2373 Tony Smith Bug fix: Forms parsing was not correctly handling fields with
embedded digits like the P4DTI-* fields in a job. This fix should
make the detection of the base variable name and its index more
reliable
#17 2279 Tony Smith Bump major version up to 2.2279 to make CPAN see this as a new release.
CPAN.pm thinks 1.982 is newer than 1.1084 so hopefully this will
stop CPAN users getting old release of P4-Client.

No functional change
#16 2223 Tony Smith Relegated previous support for "p4 diff" to the bottom drawer and
use the Diff class provided in the P4 API to send the diff listings
through the OutputText() interface. This has two main advantages over
the old implementation: (a) same output as "p4 diff" as it uses the
same classes and (b) doesn't require extra perl modules.

The old implementation is still available - you just have to
call P4::Client::DoPerlDiffs() to specify your preference.
#15 2084 Tony Smith Removed ugly hack preserving the specdef in perl hashes.
There's
no need for it as the server kindly provides it when you run
the "p4 XXX -i".

A little tidying of the test harness. It's not great, but there's
at least something in there to check the form parsing now.
#14 2010 Tony Smith Bug fix.
Fix crash when bizarre input is supplied as allegedly
valid form fields.
#13 1980 Tony Smith Porting changes.
Make P4/Perl build with ActivePerl > 623. They've
messed up the PerlIO headers now so you can't use fprintf in an XSUB
anymore. Also they're now including math.h and on Windows that must be
included with C++ linkage so we now include it before we include the other
perl headers that have to be included with C linkage.
#12 1976 Tony Smith Add support for ClientUser::Diff() to P4/Perl.
Uses the
Algorithm::Diff module to perform the diffs. Thanks to
Wilson Snyder.
#11 1894 Tony Smith Bug fix.
Correcty typo in SetCwd() -  been doing too much Ruby (It's
not a habit, I can control it) so I used [] instead of {} for
indexing a hash.
#10 1711 Tony Smith Missed changes to Client.xs.
Updated build accordingly
#9 1710 Tony Smith Bug fix/workaround.
P4::Client::SetCwd() now does genuinely change
your working directory, and also updates the PWD environment variable
so that P4CONFIG files from the target directory can be correctly
loaded.
#8 1692 Tony Smith Explicitly add extra preprocessor definitions for linux builds.
It
seems that some builds, most notably ActiveState ones don't use
_BSD_SOURCE or _SVID_SOURCE so these settings are not propagated
to additional modules.  Thanks to Jeremy Russell.
#7 1615 Tony Smith Add debugging support to the ClientUserPerl class.
It's not
complete, but it's targeted at the code which deals with
tagged output parsing which is the most complex code by far.
#6 1546 Tony Smith Fix to debugging code.
Two debug statements were not protected by
conditions so they always executed. Very annoying.  Updating
current build to 1546.
#5 1541 Tony Smith Correct error message in P4::Client::Run which still referred to the
old ClientApi class. No functional change
#4 1515 Tony Smith Bug fix.
Make sure all perl header files are included with C
linkage preventing problems with redefinition of Perl_malloc() et
al.
#3 1084 Tony Smith Bug fix: Fetching data using Tagged() or ParseForms() mode could
give "attempt to free unreferenced scalar" errors on completion.

When flattening the structured hashes into a Perforce form, the
reference counts on the contents of the hash were not being
incremented leading to their premature destruction.
#2 1050 Tony Smith Fix for parsing of complex tagged output with nested data items
such as the output from "p4 filelog" for a file with integration
records.

P4-Client can now handle any level of nested data in the response
from the Perforce server, but complex structures of this type
may not be supplied for conversion into a Perforce form. That's
OK as no Perforce forms have nested data items.

Updated current build to 1.1050
#1 1011 Tony Smith Moved Perl API stuff one level down to make way for upcoming
Ruby interface.
//guest/tony_smith/perforce/API/P4-Client/Changes
#14 977 Tony Smith Fix broken form parsing.
Two problems: first off, the specdef
was not being saved in the hash for later use so forms could
not be reconstructed from the hash data structure. Secondly,
multi-line elements parsed into array members of the hash were
not being flattened prior to reconstructing the form so they
would be empty.
#13 976 Tony Smith Fix for multi-line field handling bug.
The array handling code
was dependent on all results for a given tag being supplied before
moving on to the next tag, but this is not true for all Perforce
commands. i.e.

    p4 client -o    -> tags not fragmented
    p4 describe -s    -> oops.

Now the implementation is not fussy about the order in which
elements arrive other than that tagN comes before tagN+1. Any
number of other elements may come in between them.
#12 966 Tony Smith Updated 1.966 build
#11 964 Tony Smith Release P4::Client 1.964
#10 962 Tony Smith Added support for presenting multi-line elements of a form
as a single array member of the hashref in tagged/specstring
output.
#9 946 Tony Smith Porting to Solaris - thanks to Jeremy Russell <jrussel@reshape.com>
#8 933 Tony Smith Update changes file - forgot to add the release info yesterday
#7 929 Tony Smith Add support for form parsing to Perl API.
Allows Perforce
specs (change, client, user etc.) to be parsed by the API
and returned as Perl hashes rather than strings which must
be parsed by the user.

P4 module also has some new methods which make it easy to use
this feature. Sample code:

-------------------
use P4;

my $p4 = new P4;
$p4->ParseForms();
$p4->Init() or die( "Can't connect to Perforce" );

$p4->Edit( "filename" );
my $change = p4->GetChange();
$change->{ 'Description' } = "Some text";
$p4->SubmitSpec( $change );
print( $p4->ErrorCount() ? "Submit failed\n" : "Submit OK\n" );
-------------------
#6 926 Tony Smith Reorganise layout of API stuff.
Current builds maintained under
current/ directory, released versions under released/ . All
version numbers are <major>.<changelist> so syncing to the
changelist number gets you the code for that build.

Also updated the index page and added HTMLised versions of
the pod to make it easy to see if this is what you need.
#5 582 Tony Smith Improved docs in UI.pm and fixed minor bug which caused problems
when calling scripts attempt to save the hashref passed to
UI::OutputInfo() for later use. It was casued by the members
of the hash being mortal variables. They will now persist if
referred to.

A couple of other minor bug fixes to UI.pm. Changes file has the
details.
#4 577 Tony Smith Preparations for release of P4::Client version 0.52
#3 576 Tony Smith Add an example script showing how to use the Perl API.
#2 575 Tony Smith Minor bug fixes to UI.pm - module initialisation now returns
true as it's supposed to, and new is no longer exported into
the callers namespace (ouch!)
#1 549 Tony Smith Renamed the working directory to P4-Client as I've discovered
that MakeMaker is quite happy with that and doesn't require a
version number in the directory name.
//guest/tony_smith/perforce/API/P4-Client-0.51/Changes
#3 529 Tony Smith Threaded Perl fix.
Mustn't use dTHX on old perls, it doesn't
exist. Also updated the Changes file with a comment I missed
earlier.
#2 528 Tony Smith Updated version numbers etc.
and tarball for 0.51.
#1 527 Tony Smith Release P4::Client version 0.51 with Win32 support
//guest/tony_smith/perforce/API/P4-Client-0.50/Changes
#2 511 Tony Smith Completed the process of renaming P4::ClientApi to P4::Client
#1 509 Tony Smith Renamed P4::ClientApi to P4::Client as it's more friendly and
that's what it's called on CPAN.  Subsequent changes include
the actual renaming inside the code, this just creates the
branch
//guest/tony_smith/perforce/API/P4-ClientApi-0.05/Changes
#1 501 Tony Smith First publicly released version of the Perl interface to the
Perforce API.