A motley collection of darcs utilities (fork of ganesh's darcs-utils)

root

darcs-utils is a random collection of utilities written against the
Darcs API <http://darcs.net/Library>.

Utilities
=========

annotate-authors
----------------

Produces a list of authors, ranked by how many lines of the repository were
last touched by each author (in the same sense that 'darcs annotate' attributes
lines of a single file to a patch).

Without arguments, it reports statistics for the entire repository.

One or more files or directories in the repository can be supplied as
arguments, and then statistics will be reported for just those items.
Supplying a directory means including all the files inside that
directory or subdirectories.

If a file is listed more than once on the command-line or by being
included via a directory, it will only be counted once.

If the first two arguments are "--csv <filename>", then per-file statistics
will be written out to <filename> in the following format:

    "path to file", "author", "lines in file touched by author"

annotate-authors can run in parallel: add "+RTS -N -RTS" anywhere in the list
of arguments to use as many threads as cores on the machine, or
"+RTS -N<n> -RTS" to use <n> threads.

Progress is reported on standard error as annotate-authors runs.

tag-intersection
----------------

tag-intersection calculates the set of patches that are present in both the
current repository and one or more other repositories, and tags that set of
patches. The other repositories are supplied as command-line arguments, and
the tag name is requested interactively.

Development
===========

The official repository for the project is at

    http://hub.darcs.net/ganesh/darcs-utils

Patches can be sent to 'ganesh@earth.li'.

Contributions of more utilities or improvements to the existing ones are
very welcome.

One goal of this project is to guide improvements in the Darcs API.

One common way of developing utilities is to copy and paste the code for a
related Darcs command, and then tweak it as necessary.

For example, the code for annotate-authors was based on the code for
'darcs annotate', with calls to some of the internals of 'darcs show authors'.
The code for tag-intersection was based on the code for both 'darcs tag' and
'darcs pull'.

Ideally, the internals of Darcs would be exposed in a way that copy and
paste is not needed.

The plumbing for writing command-line utilities that behave in a similar way
to Darcs should also be standardised.