some svn utils to easily import/checkout packages
Project description
CHANGES
0.2
Add .pyo to ignore files
0.1
Initial version
What is svnhelper ?
This package provide some svn utils.
Import
When you importing a package for the first time, you need to create the trunk/branches/tags tree, remove pyc files, .egg-info, etc. svnhelper do it for you.
In a python package, just use:
$ python setup.py import
And you will be prompted for the repository root. Do not add the package name in the url. The name will be retrieved from the current path.
Outside a python package, you can use this command line:
$ svnh -i <repository>
Checkout
To checkout a package, use:
$ svnco <url>
If no branche or tag is found in the url. svnhelper will checkout the trunk.
Testing
It’s not easy to test svn stuff in unit tests. svnhelper provide a testing environment for you.
Here is how to create a temporary repository:
>>> from svnhelper.testing import setUpRepository >>> from svnhelper.testing import tearDownRepository >>> def setUp(test): ... setUpRepository(test) >>> def tearDown(test): ... tearDownRepository(test)
Then you can import a directory in the repository. test_package is a directory pointing on a testing egg in the test/ directory:
>>> import_test_package(test_package)
The we can use the repository:
>>> dirname = create_tempdir() >>> os.chdir(dirname) >>> print svn('co', '%s/my.testing/trunk' % repository, 'my.testing') A my.testing/LICENSE A my.testing/my A my.testing/my/__init__.py A my.testing/my/testing A my.testing/my/testing/__init__.py A my.testing/my/testing/README.txt A my.testing/setup.py Checked out revision 1. >>> ls(dirname, 'my.testing') d .svn - LICENSE d my - setup.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file svnhelper-0.2.tar.gz
.
File metadata
- Download URL: svnhelper-0.2.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2348fe28888359079f44c535c993cba7b55e534c04cf9c9d846328335165ca79 |
|
MD5 | d36e6a7ff2e67a4214e339c255c8576b |
|
BLAKE2b-256 | dd33ee849a75dab885ef20af87b6137d2c9a50e08c44454436b4210051fb5e02 |