A Scalable, User-Friendly Source Control System.
Go to file
Gregory Szorc 545ec2de44 show: use consistent (and possibly shorter) node lengths
`hg show` makes heavy use of shortest() to limit the length of the node
hash.

For the "stack" and "work" views, you are often looking at multiple
lines of similar output for "lines" of work. It is visually appeasing
for things to vertically align. A naive use of {shortest(node, N)}
could result in variable length nodes and for the first character of
the description to vary by a column or two.

We implement a function to determine the longest shortest prefix for
a set of revisions. The new function is used to determine the printed
node length for all `hg show` views.

.. feature::

   show: use consistent node length in views

Our previous shortest node length of 5 was arbitrarily chosen.

shortest() already does the work of ensuring that a partial node
isn't ambiguous with an integer revision, which is our primary risk
of a collision for very short nodes. It should be safe to go with the
shortest node possible.

Existing code is also optimized to handle nodes as short as 4.

So, we decrease the minimum hash length from 5 to 4.

We also add a test demonstrating that prefix collisions increase the
node length.

.. feature::

   show: decrease minimum displayed hash length from 5 to 4

Differential Revision: https://phab.mercurial-scm.org/D558
2017-09-13 21:15:46 -07:00
contrib check-code: fix incorrect capitalization in camelcase regex 2017-09-06 08:22:54 -07:00
doc doc: port check-seclevel.py to be Python 2/3 portable 2017-05-28 15:51:26 -04:00
hgdemandimport demandimport: prefer loaded module over package attribute (issue5617) 2017-07-16 17:38:39 +09:00
hgext show: use consistent (and possibly shorter) node lengths 2017-09-13 21:15:46 -07:00
hgext3rd extensions: also search for extension in the 'hgext3rd' package 2016-03-11 10:30:08 +00:00
i18n i18n: use actual filename, in which function is defined, for hg.pot 2017-08-02 00:02:11 +09:00
mercurial show: pass the minimum length for nodes as a template keyword 2017-08-03 21:51:34 -07:00
tests show: use consistent (and possibly shorter) node lengths 2017-09-13 21:15:46 -07:00
.editorconfig mercurial: add editorconfig 2016-04-05 18:10:33 +01:00
.hgignore make: templatize Debian build target a la 7766b31dd141 2017-06-23 13:08:46 +08:00
.hgsigs Added signature for changeset 229937197835 2017-08-10 18:46:55 -04:00
CONTRIBUTING contributing: add new file with a pointer to the wiki 2016-10-08 10:39:00 -04: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: update top-level script to use modern import conventions 2017-08-22 14:14:19 -04:00
hgeditor spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
hgweb.cgi urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Makefile osx: delay version computation on macOS builds 2017-08-10 21:25:02 -04:00
README README: make paragraphs before example code end with "::" for reST syntax 2017-07-31 21:47:53 +09:00
setup.py setup: fix installing in a mingw environment 2017-08-11 10:16:00 +09: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 https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.