[p4ruby] p4ruby problem acc. to integrate

mkellner at nemetschek.de mkellner at nemetschek.de
Wed Oct 10 04:57:20 PDT 2007

Hi Tony,

you are right according to
      x[ 'startFromRev' ] + 1

On the old environment with P4 2006.1 I did use
p4ruby-1.4841-1.8.0-setup.exe together with ruby185-21.exe.
Is there a possibility to see the P4Ruby revision by looking into P4.rb or
something else?
You are right, I get the strings instead of the hashes, even if I thought I
first had the hashes and only sometimes (error case: can't branch from) the

Thanks a lot for your help.

        Martin Kellner

                                                      Configuration Manager
                                                      Team CAD Organisation
                                                ("NE KE_Team_Organisation")

                                               Tel.:   +49-(0)89-92793-1561
                                                Fax:   +49-(0)89-92793-4561
                                            Email:   mkellner at nemetschek.de

                                                 Nemetschek Technology GmbH
                                                        Konrad-Zuse-Platz 1
                                                          D - 81829 München

                                                              Ernst Homolka

                                                               Sitz München
                                             Amtsgericht München HRB 147169

Tony Smith <tony at smee.org> schrieb am 09.10.2007 11:42:28:

> Hi Martin,
> > yes, adding "p4.api = 57" does help, which means my small test tool
> > report now
> > ...
> >
> >.cpp#3 - sync/integrate from
> >
> >r.cpp#2 ...
> >
> > Do you know the cause of this behaviour?
> Yes - using p4.api=57 causes the server to treat your client like a
> Perforce client and back then 'p4 integrate' didn't support tagged
output. In
> P4Ruby, this means that you get a string instead of a Hash.
> > The disadvantage of this modification "p4.api = 57" is that the tool
> > now 16 instead of 11 seconds...
> That's just because someone else was likely locking the tables and slowed
> down (api=57 won't slow the server, or the client, down - if anything it
> should be a fraction faster)
> I noticed that your script uses:
>      output += x["startFromRev"].to_s
> and I think that's the problem: startFromRev needs to be incremented to
> accurate as it's value is actually one less than the first revision in
> range. So:
>    startFromRev   = 1
>    endFromRev   = 2
> means #2,2 (or, as Perforce formats it, just #2)
> So, in your script you should use x[ 'startFromRev' ] + 1.
> Now, the next question is: why doesn't it work in your old environment?
> theory there is that your old P4Ruby build was built with the 2004.2 API
> (i.e. api level 57), so it doesn't support tagged output on 'p4
> This ties up with your version number as P4Ruby 1.4841 was released on
> Mar 07 2005, and 2004.2 was the current release at that time.
> You can test this theory by removing the code that handles string output
> your script and running it in your old environment - if you get 'not
> yet!' in your output (the message in your 'else' block), then you know
> the old P4Ruby environment was just getting a String from the server, and
> a Hash.
> Let me know if you need any more information.
> Regards,
> Tony

> This email and any files transmitted with it are confidential and
> solely for the use of the individual or entity to whom they are
addressed. If
> you have received this email in error please notify the system
> manager. Please
> note that any views or opinions presented in this email are solely
> those of the
> author and do not necessarily represent those of Perforce Software.
> the recipient should check this email and any attachments for the
presence of
> viruses. Perforce Software accepts no liability for any damage caused by
> virus transmitted by this email.
> Perforce Software UK Ltd is registered in England and Wales as company
> 3816019 at the following address: West Forest Gate, Wellington
> RG40 2AQ, UK

> ForwardSourceID:NT00259DAA

More information about the p4ruby mailing list