Using SVN with Python and .pyc files

J

James Stroud

Hello All,

I have been moving to managing a lot of my code with SVN and I have
found it to work extremely well. However, I'm not exactly sure how to
deal with all of the .pyc files that get created every time I test a
project or package. How do people manage this? Do you run a script to
find files with the .pyc extension and delete those before every commit,
or is there a more elegant way? It seems like a lot of wasted bandwidth
an memory on the server side to constantly be dealing with these files
that contain no real information.

James
 
R

Roel Schroeven

James Stroud schreef:
I have been moving to managing a lot of my code with SVN and I have
found it to work extremely well. However, I'm not exactly sure how to
deal with all of the .pyc files that get created every time I test a
project or package. How do people manage this? Do you run a script to
find files with the .pyc extension and delete those before every commit,
or is there a more elegant way? It seems like a lot of wasted bandwidth
an memory on the server side to constantly be dealing with these files
that contain no real information.

You can instruct SVN to ignore the *.pyc files. What you need to do that
is the svn:ignore property on the directory containing the files, IIRC.
Check the docs for details. The online book at
http://svnbook.red-bean.com/ should tell you all you need. Look
especially at
http://svnbook.red-bean.com/nightly/en/svn.advanced.props.html#svn.advanced.props.special.ignore
 
D

Duncan Booth

James Stroud said:
I have been moving to managing a lot of my code with SVN and I have
found it to work extremely well. However, I'm not exactly sure how to
deal with all of the .pyc files that get created every time I test a
project or package. How do people manage this? Do you run a script to
find files with the .pyc extension and delete those before every commit,
or is there a more elegant way? It seems like a lot of wasted bandwidth
an memory on the server side to constantly be dealing with these files
that contain no real information.

You use svn:ignore to ignore files you don't want version controlled.

See:
http://svnbook.red-bean.com/nightly/en/svn.advanced.props.html#svn.advanced.props.special.ignore
 
G

Gregor Horvath

James said:
project or package. How do people manage this? Do you run a script to
find files with the .pyc extension and delete those before every commit,
or is there a more elegant way? It seems like a lot of wasted bandwidth
an memory on the server side to constantly be dealing with these files
that contain no real information.

in /etc/subversion/config

global-ignores = *.pyc *~ #*#
 
J

James Stroud

Everyone wrote:
[something helpful]

Thank you to everyone for your responses.

James
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top