python cvs interface?

C

corey

Hi everyone, this should be a quick question. I'm writing some scripts
to take some file and move them into a CVS repository, but it's pretty
slow, because it uses system calls to execute the CVS commands. Has
anyone ever made a python to CVS interface library that I could use?
I've been trying to google around for something, but predictably I get
a zillion sourceforge repository hits, and it isn't really helping. So
anyway, if anyone knows of a useful module, I'd love to hear about it.
Thanks!

----- Corey
 
C

corey

Ah, unfortunately it looks like this program uses something called
gcvs, a gtk cvs interface written in C++, for interfacing to low level
cvs routines. So it probably won't work for me. Oh well. Anyone else
have any suggestions?
 
G

gaudetteje

From what it sounds like in your program, you're making an os.system()
function call and waiting for the results, correct? Have you tried
using the plethora of parallel system tools so that you don't have to
wait for a command to finish? Using a function that will launch your
command in a new thread/process may speed up your program considerably.

Simply launch a task, return control to the user, and refresh after it
returns successfully.
 
L

Lonnie Princehouse

Unless your CVS repository is local, the overhead associated with
calling CVS through system calls isn't going to be a bottleneck, and
even then it shouldn't be too bad. Using one of the varieties of
os.popen instead of os.system will make it easier to avoid disk I/O
when communicating with the cvs process.

It will be a hassle to parse CVS' copious output, though. I've wished
for a Python CVS module before, too. Good luck =)

IMHO, the best way to write a Python CVS module would actually be to
call it from the command line; writing a Python C Extension for this
purpose would introduce a negligible performance increase at the cost
of all sorts of other hassles, like expecting users to have the CVS
headers/libraries and a C compiler and possibly something like SWIG or
Boost Python as well.
 
C

corey

Well, the problem is that there are a lot of files to deal with, and
I'm already running in parallel, but it still takes a while. Also, cvs
uses some sort of locking scheme to stop parallel updates, so it's hard
to parallelize effectively.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top