view mercurial/help/revisions.txt @ 22451:186fd06283b4

revset: lower weight for _intlist function The histedit command uses a revset like: (_intlist('1234\x001235')) and merge() Previously the optimizer gave a weight of 1.5 to the _intlist side (1 for the function, 0.5 for the string) which caused it to process the merge() side first. This caused it to evaluate merge against every commit in the repo, which took 2.5 seconds on a large repo. I changed the weight of _intlist to 0, since it's a trivial calculation, which makes it process intlist first, which makes merge apply only to the revs in the list. Which makes the revset take 0.15 seconds now. Cutting off 2.4 seconds off our histedit performance. >From the revset benchmark: revset #25: (_intlist('20000\x0020001')) and merge() 0) obsolete feature not enabled but 54243 markers found! ! wall 0.036767 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) 1) obsolete feature not enabled but 54243 markers found! ! wall 0.000198 comb 0.000000 user 0.000000 sys 0.000000 (best of 9084)
author Durham Goode <durham@fb.com>
date Fri, 12 Sep 2014 14:21:18 -0700
parents 4edd179fefb8
children bbb5cc55ab8b
line wrap: on
line source

Mercurial supports several ways to specify individual revisions.

A plain integer is treated as a revision number. Negative integers are
treated as sequential offsets from the tip, with -1 denoting the tip,
-2 denoting the revision prior to the tip, and so forth.

A 40-digit hexadecimal string is treated as a unique revision
identifier.

A hexadecimal string less than 40 characters long is treated as a
unique revision identifier and is referred to as a short-form
identifier. A short-form identifier is only valid if it is the prefix
of exactly one full-length identifier.

Any other string is treated as a bookmark, tag, or branch name. A
bookmark is a movable pointer to a revision. A tag is a permanent name
associated with a revision. A branch name denotes the tipmost open branch head
of that branch - or if they are all closed, the tipmost closed head of the
branch. Bookmark, tag, and branch names must not contain the ":" character.

The reserved name "tip" always identifies the most recent revision.

The reserved name "null" indicates the null revision. This is the
revision of an empty repository, and the parent of revision 0.

The reserved name "." indicates the working directory parent. If no
working directory is checked out, it is equivalent to null. If an
uncommitted merge is in progress, "." is the revision of the first
parent.