[p4ruby] Re: P4Ruby and login tickets

Tony Smith tony at smee.org
Wed Feb 9 08:11:01 PST 2005


Hi Johan

> You're welcome. While I've got you 'on-line', what would you think
> about:
>
> 1. Provide a way to retrieve the current exception level.

On investigating this, I found it already exists (and has done for some 
time!). P4#exception_level? is what you're looking for.

> 2. Providing named constants for the exception levels.

I've just submitted a change that implements this suggestion. The constants 
are:

P4::RAISE_NONE 
P4::RAISE_ERRORS
P4::RAISE_ALL

> 3. Provide P4.at_exception_level(level) { ... } for things that need a
> temporarily lowered/raised exception level - example:
>
> ...
> P4.at_exception_level(P4::RAISE_ERRORS_ONLY) {
>   changes = p4.run_changes("...")
> }

This is done too. I provided a P4#at_exception_level() rather than 
P4.at_exception_level() - by convention the latter denotes a class method 
while the former denotes an instance method. 

See: 
http://public.perforce.com/guest/tony_smith/perforce/API/Ruby/main/doc/P4.html#at_exception_level

for more information. 

Thanks again for your input.

Regards,

Tony



More information about the p4ruby mailing list