Skip to main content

UNKNOWN

Project description

Checkoutmanager

Makes bzr/hg/git/svn checkouts in several places according to a config file.

The advantage: you’ve got one command with which you can update all your checkouts. And with which you can ask for a list of uncommitted changes. And you can rebuild your entire checkout structure on a new machine just by copying the config file (this was actually the purpose I build it for: I had to change laptops when I switched jobs…).

Warning: I only tested it on OSX and linux, so no guarantees for windows. If there are changes needed, they’ll probably be minor. So I welcome bug reports and patches.

Generic usage

What I normally do every morning when I get to work is checkoutmanager up. This grabs the latest versions of all my checkouts from the server(s). So an svn up for my subversion checkouts, a hg pull -u for mercurial and so on.

From time to time, I’ll do a checkoutmanager st to show if I’ve got some uncommitted files lying around somewhere. Very handy if you’ve worked in several directories throughout the day: it prevents you from forgetting to check in that one bugfix for a whole week.

A new project means I add a single line to my config file and run checkoutmanager co.

Checkoutmanager allows you to spread your checkouts over multiple directories. It cannot mix version control systems per directory, however. As an example, I’ve got a ~/buildout/ directory with my big svn website projects checked out there. And a directory with my svn work python libraries. And a ~/hg/ dir with my mercurial projects. And I’ve made checkouts of several config directories in my home dir, such as ~/.emacs.d, ~/.subversion and so on. Works just fine.

Commands

Available commands:

exists

Print whether checkouts are present or missing

up

Grab latest version from the server.

st

Print status of files in the checkouts

co

Grab missing checkouts from the server

missing

Print directories that are missing from the config file

Output directory naming

If you don’t specify an output directory name for your checkout url, it just takes the last part. One exception: subversion. It is intelligent there:

  • https://xxx/yyy/product/trunk becomes “product” instead of “trunk”.

  • https://xxx/yyy/product/branches/experiment becomes “product_experiment” instead of “experiment”

If you want something else, just specify a directory name (separated by a space) in the configuration file.

Config file

Sample configuration file:

# Sample config file.  Different sections per base location
# and version control system.  Splitting everything all over
# the place in multiple directories is fine.

[recipes]
# Buildout recipes I work on.
vcs = svn
basedir = ~/svn/recipes
checkouts =
    svn://svn/blablabla/trunk
    svn://svn/another/trunk differentname
    http://host/yetanother/trunk
    https://host/yetanother/branches/reinout-fix

[dotfolders]
# Folders that end up as dotted configfolders in the root.
# Note that there's a directory name behind the repository
# location, separated by a space.
vcs = bzr
basedir = ~
checkouts =
    lp:emacsconfig/trunk .emacs.d
    sftp://somwhere/subversion/trunk .subversion

TODO

  • Wait for windows bug reports and fix a couple of small things.

  • Wait for feedback so that I can improve the documentation.

Credits

Created by Reinout van Rees.

Changelog of vanrees.checkoutmanager

1.1 (2010-08-02)

  • Switched from “commands” module to “subprocesses” for windows compatibility.

1.0 (2010-08-01)

  • Small fixes. It works great in practice.

  • Moved from bzr to hg and made it public on bitbucket.org.

  • Big documentation update as I’m going to release it.

0.1 (2010-05-07)

  • First reasonably working version.

  • Initial library skeleton created by thaskel.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checkoutmanager-1.1.tar.gz (7.8 kB view details)

Uploaded Source

File details

Details for the file checkoutmanager-1.1.tar.gz.

File metadata

  • Download URL: checkoutmanager-1.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for checkoutmanager-1.1.tar.gz
Algorithm Hash digest
SHA256 afb445b4891bfa567518ecb12fd578cb791bbd33cb15154d1c3ffdf739f39ba9
MD5 e63a8da7302c43cd5d9327832733ee64
BLAKE2b-256 24afcc9f1e37541c7d34192431122f9c7c642c285e4204bdfeb1dd541fdb4a7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page