A Scalable, User-Friendly Source Control System.
Go to file
Anton Shestakov ca791cb0ef templater: add count template filter, plus tests
Previously there was no way of telling how much children or bookmarks or tags a
certain changeset has in a template. It was possible to tell if a changeset has
either 0 or not 0 bookmarks, but not to tell if it has 1 or 2 of them, for
example.

This filter, simply named count, makes it possible to count the number of items
in a list or the length of a string (or, anything that python's len can count).
E.g.: {children|count}, {bookmarks|count}, {file_adds|count}.

Testing the filter on node hash and shortened node hash is chosen because they
both have defined length.

As for lists of strings - children, tags and file_adds are used, because they
provide some variety and also prove that what's counted is the number of string
items in the list, and not the list stringified (they are lists of non-empty,
multi-character strings).

Additionally, revset template function is used for testing the filter, since
the combination is very flexible and will possibly be used together a lot.

(The previous version of this patch had an incorrect email subject and was
apparently lost - patchwork says the patch has been accepted, but it's not so.
The changes between that and this patch are minimal: now the filter does not
disturb the alphabetical order of function definitions and dict keys.)
2014-09-09 22:14:13 +09:00
contrib hgk: define bookmark colour explicitly, as Tk 8.6 has changed their meaning 2014-09-28 13:27:40 +02:00
doc gendoc: restore use of callable() since it was readded in Python 3.2 2014-06-23 09:23:57 -04:00
hgext largefiles: remove 'forget' list that's always empty 2014-09-30 14:32:49 -07:00
i18n merge with stable 2014-10-01 15:05:09 -05:00
mercurial templater: add count template filter, plus tests 2014-09-09 22:14:13 +09:00
tests templater: add count template filter, plus tests 2014-09-09 22:14:13 +09:00
.hgignore contrib/vagrant: use Vagrant for running tests on virtual machine 2014-07-05 16:32:28 +03:00
.hgsigs Added signature for changeset a9cf27087b11 2014-10-01 14:59:33 -05:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
hg hg: add support for HGUNICODEPEDANTRY environment variable 2014-06-23 09:33:07 -04:00
hgeditor Fixed a bashism with the use of $RANDOM in hgeditor. 2010-05-19 18:06:35 +02:00
hgweb.cgi mq: add a warning about uncommitted changes for qfinish 2011-11-10 15:40:34 -06:00
Makefile docker: use stable tags for fedora and centos 2014-08-31 13:41:09 +02:00
README readme: mention how to run in-place 2012-03-02 21:43:55 +02:00
setup.py setup: set mode 644 or 755 on installed files 2014-09-30 17:13:54 -07:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing:

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See http://mercurial.selenic.com/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.