[BangPypers] Using pysvn how can i capture the log of checkout() and return code of the checkout() to use the exit code of check out activcity basically .

Noorul Islam K M noorul at noorul.com
Wed Oct 9 13:15:03 CEST 2013


babmis <babmis at outlook.com> writes:

> This is snippet is not complete, but primary intention is
>
> revision = client.checkout(link, path, recurse=True)
>
> After this how can i check the exit code and capture the specific log that would have generated during this transaction of svn co command internally.
>

I think callback_notify gives you more information about result of the
commands.

- Noorul

>
>
> On 10/9/2013 3:01 PM, Noorul Islam K M wrote:
>> babmis <babmis at outlook.com> writes:
>>
>>> Here  is the code i am trying:
>>>
>>>
>>>
>>>    2     from pysvn import wc_status_kind
>>>    3     import pysvn
>>>    4
>>>          import os, os.path
>>>    6     import re
>>>    7
>>>    8     def createSVNClient():
>>>    9         """Create a pysvn client, and setup some callback and options.
>>>   10         """
>>>   11
>>>   12         def login(*args):
>>>   13             return True, 'root', 'pass', False
>>>   16
>>>   17         client = pysvn.Client()
>>>   18         client.set_interactive(True)
>>>   19         client.callback_get_login = login
>>>   20         return client
>>>   21
>>>   22     client = createSVNClient()
>>>
>>>   23     link = "http://demo.com/svn/trunk"
>>>   24     path = '/tmp/ux'
>>>   25     client.exception_style = 1
>>>   26
>>>   27     try:
>>>   28         revision = client.checkout(link, path, recurse=True)
>> I this code snippet complete?
>>
>> - Noorul
>>
>>


More information about the BangPypers mailing list