Skip to content

apepper/repositoryhandler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepositoryHandler

Description

RepositoryHandler is a Python library for handling code repositories through a common interface.

This is a fork from the original in order to add patches. Feature parity with the original code is not guaranteed.

Supported repository types

  • cvs
  • Subversion (svn)
  • git
  • Bazaar (bzr) (Preliminary support)
  • Tarball

Dependencies

  • Python >= 2.4 (this might change to Python 2.6... upgrade already :) )
  • cvs client
  • svn client
  • wget or curl

How to install

This version of RepositoryHandler should be installed using pip, which will allow you to install it from source here at GitHub.

pip install -e "git+git://github.com/Lewisham/repositoryhandler.git#egg=repositoryhandler"

If you don't have pip, you can download the source package using the big "Download" button in the top-right, then run

python setup.py install

You'll probably want to use sudo for that, in order to put packages in Python's default place. If you know how to mess with your Python load paths, you can omit it.

As this package is an unofficial fork, it will not be uploaded to PyPi in the foreseeable future.

Examples

  • CVS Repository

from repositoryhandler.backends import create_repository

# create a cvs repository for poppler on FreeDesktop
repo = create_repository ('cvs', ':pserver:[email protected]:/cvs/poppler')

# checkout module poppler into /tmp directory from HEAD
repo.checkout ('poppler', '/tmp/')

# update working copy on /tmp from POPPLER_0_5_X branch
repo.update ('/tmp/poppler', rev = 'POPPLER_0_5_X')

# show diff between HEAD and POPPLER_0_5_X branches
diff = repo.diff ('/tmp/poppler', revs = ['HEAD', 'POPPLER_0_5_X'])
print diff

# show history for ChangeLog file
history = repo.log ('/tmp/poppler', files = ['ChangeLog'])
print history

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%