##// END OF EJS Templates
revset: add 'only' revset...
revset: add 'only' revset Adds a only() revset that has two forms: only(<set>) is equivalent to "::<set> - ::(heads() - heads(<set>::))" only(<include>,<exclude>) is equivalent to "::<include> - ::<exclude>" On a large repo, this implementation can process/traverse 50,000 revs in 0.7 seconds, versus 4.2 seconds using "::<include> - ::<exclude>". This is useful for performing histedits on your branch: hg histedit -r 'first(only(.))' Or lifting branch foo off of branch bar: hg rebase -d @ -s 'only(foo, bar)' Or a variety of other uses.

File last commit:

r10263:25e57239 stable
r20613:10433163 default
Show More
node.py
18 lines | 449 B | text/x-python | PythonLexer
# node.py - basic nodeid manipulation for mercurial
#
# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import binascii
nullrev = -1
nullid = "\0" * 20
# This ugly style has a noticeable effect in manifest parsing
hex = binascii.hexlify
bin = binascii.unhexlify
def short(node):
return hex(node[:6])