python script for tortoise cvs

Gabriel Genellina gagsl-py2 at
Thu Jun 19 23:54:30 CEST 2008

En Thu, 19 Jun 2008 10:26:09 -0300, Simon Brunning <simon at> escribió:

> On Thu, Jun 19, 2008 at 2:14 PM, sandeep <shiningsandy at> wrote:
>> hi
>> we are using tortoise cvs and putty. i want to write a python script
>> to whom i can provide a tag and what this script will do is
>> look for this specific tag and checks for whether its a individual tag
>> or its inside a branch.if its inside a branch then find out what is
>> the branch tag and then check out that branch for me else it checks
>> out that module with that tag.
>> Actually the thing is i am not able to find the way how i will do it
>> and for where i have to look for the any help will be
>> appreciated.
> I don't know if Tortoise is scriptable, but Subversion certainly is -
> <> - and nothing you mention is Tortoise
> specific.

(Note that he said Tortoise CVS - not Tortoise SVN)
To Sandeep: You should divide the question in two parts:
- how to obtain the info you want from cvs. This has nothing to do with Python; better ask in a CVS group related to your server. Suppose the answer is "use the status command with the -lv options", then you'll be able to obtain the info you want "by hand", executing said cvs command from the cmd prompt.
- the next task is to automate the execution using Python. You have to run the command, capture its output and extract the info you want. How to do that *is* a Python question, but you'll have to formulate it very precisely: "I want to read the output coming from this command, locate the line that contains the word XXX starting at column 12, and take the last word on the third line below it"
For that second part you can get some help here, but first you have to know *what* to execute and *what* to look for in the output.

(Anyway, I think the question is not well formulated - what is an "individual tag", as opposed to "inside a branch"? Every tag applied on a file marks a certain revision in a certain branch, - if you consider the trunk as a branch too. Do you want to know if the tag was applied directly over a file on the trunk? Or do you want to know if the tag is a "branch tag"?)

Gabriel Genellina

More information about the Python-list mailing list