##// END OF EJS Templates
crecord: call prevsibling() and nextsibling() directly...
crecord: call prevsibling() and nextsibling() directly The 3 classes for items used in crecord (uiheader, uihunk, uihunkline) all have prevsibling() and nextsibling() methods. The two methods are used to get the previous/next item of the same type of the same parent element as the current one: when `a` is a uihunkline instance, a.nextsibling() returns the next line in this hunk (or None, if `a` is the last line). There are also two similar methods: previtem() and nextitem(). When called with constrainlevel=True (the default) they simply returned the result of prevsibling()/nextsibling(). Only when called with constrainlevel=False they did something different: they returned previous/next item regardless of its type (so if `a` is the last line in a hunk, a.nextitem(constrainlevel=False) could return the next hunk or the next file -- something that is not a line). Let's simplify this logic and make code call -sibling() methods when only siblings are needed and -item() methods when any item would do, and then remove the constrainlevel argument from previtem() and nextitem().
av6 -
r29130:ed2a3818 default
Show More
Name Size Modified Last Commit Author
contrib
doc
hgext
hgext3rd
i18n
mercurial
tests
.editorconfig Loading ...
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
setup.py Loading ...

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.