##// END OF EJS Templates
tests: avoid git diffstat singular/plural output difference...
tests: avoid git diffstat singular/plural output difference 'git diff --stat' output changed with regard to the amount of changes/insertions/deletions shown. In older git versions (1.7.7.6), output was shown as: 2 files changed, 2 insertions(+), 1 deletions(-) In newer versions, output is shown as: 2 files changed, 2 insertions(+), 1 deletion(-) This patch uses a regex to handle both cases.

File last commit:

r10263:25e57239 stable
r23551:76516215 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])