List Info

Thread: Re: p4ruby problem acc. to integrate




Re: p4ruby problem acc. to integrate
user name
2007-10-09 04:42:28
Hi Martin,

> yes, adding "p4.api = 57" does help, which
means my small test tool does
> report now
> ...
>
//Allplan/Products/MAIN/NemAll_Data/NemAll_DataFertigteil/Fe
rtSource/sqattr
>.cpp#3 - sync/integrate from
>
//Allplan/Products/2005/LATEST/Libs_Allplan/Libs_Fertigteile
/fertallg/sqatt
>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 2004.1 
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 needs
> now 16 instead of 11 seconds...

That's just because someone else was likely locking the
tables and slowed you 
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 be 
accurate as it's value is actually one less than the first
revision in the 
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? My 
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 integrate'. 
This ties up with your version number as P4Ruby 1.4841 was
released on Mon 
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 in 
your script and running it in your old environment - if you
get 'not handled 
yet!' in your output (the message in your 'else' block),
then you know that 
the old P4Ruby environment was just getting a String from
the server, and not 
a Hash.

Let me know if you need any more information.

Regards,

Tony
_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

Re: p4ruby problem acc. to integrate
user name
2007-10-10 06:57:20
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
strings...

Thanks a lot for your help.

Regards,
        Martin Kellner


                                                     
Configuration Manager
                                                      Team
CAD Organisation
                                                ("NE
KE_Team_Organisation")

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

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

                                                          
Geschäftsführer:
                                                            
 Ernst Homolka

                                                            
  Sitz München
                                             Amtsgericht
München HRB 147169




Tony Smith <tonysmee.org> schrieb am 09.10.2007
11:42:28:

> Hi Martin,
>
> > yes, adding "p4.api = 57" does help,
which means my small test tool
does
> > report now
> > ...
> >
//Allplan/Products/MAIN/NemAll_Data/NemAll_DataFertigteil/Fe
rtSource/sqattr
> >.cpp#3 - sync/integrate from
> >
//Allplan/Products/2005/LATEST/Libs_Allplan/Libs_Fertigteile
/fertallg/sqatt
> >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
2004.1
> 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
needs
> > now 16 instead of 11 seconds...
>
> That's just because someone else was likely locking the
tables and slowed
you
> 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
be
> accurate as it's value is actually one less than the
first revision in
the
> 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?
My
> 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
integrate'.
> This ties up with your version number as P4Ruby 1.4841
was released on
Mon
> 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
in
> your script and running it in your old environment - if
you get 'not
handled
> yet!' in your output (the message in your 'else'
block), then you know
that
> the old P4Ruby environment was just getting a String
from the server, and
not
> a Hash.
>
> Let me know if you need any more information.
>
> Regards,
>
> Tony
>
>
>
------------------------------------------------------------
--------------------

> This email and any files transmitted with it are
confidential and
intended
> 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.
Finally,
> the recipient should check this email and any
attachments for the
presence of
> viruses. Perforce Software accepts no liability for any
damage caused by
any
> virus transmitted by this email.
>
> Perforce Software UK Ltd is registered in England and
Wales as company
no.
> 3816019 at the following address: West Forest Gate,
Wellington
Road,Wokingham,
> RG40 2AQ, UK
>
------------------------------------------------------------
--------------------


> ForwardSourceID:NT00259DAA

_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )