cq /

Filename Size Date modified Message
2.5 KB
997 B
1.3 KB
2.2 KB
1012 B
79 B
416 B


Commit Queue is a tool to allow working on Subversion working copies, when offline, while still making atomic commits. It does this by creating a Mercurial repository ( a copy of the working copy ) and allowing you to commit to Mercurial. It keeps track of files added and deleted and modified, along with commit messages. When access is available, you can commit to the central server automatically, and in order.



Cq is distributed as a distutils package. Extract the archive, go into the directory and run:

python install

The cq command will be installed in /usr/bin/ on Linux, and the relevant location on Windows.


### Initialize
cq init /path/to/svn/working/copy [mercurial repository path]

Creates a new mercurial repository in ./copy-hg, where copy is the name of the working copy directory. If mercurial repository path is specified, creates it there instead. All files in the working copy are copied over to the repository and an initial commit is made. In addition a commit hook is registered to track the repository state and synchronize with the working copy.

cq init will create a .cq directory in both the working copy and the repository. You should set the svn:ignore option on the .cq in the working copy.

From this point on you should change to the mercurial repository

edit files... hg add hg rm hg ci -m "Message" ...

### Commit Assuming you now have access to the central Subversion repository, run:

cq commit

This will perform the modifications that you did on the mercurial repository in order and run svn commit with each commit message. Use -v to view individual svn commands. Right now there is no support for resuming from a certain commit, so be careful about interrupting the process.

### Cleanup If you no longer want the repository, run:

cq clean

This will remove the relevant .cq directories. If the -d option is set, it will also delete the Mercurial repository. NOTE: Cq does not currently check if commits are pending, so be careful!