view mercurial/node.py @ 21707:e22cfd1ae97c stable

keyword: suppress keyword expansion while 'hg histedit' for internal merge Before this patch, 'hg histedit' may cause unexpected conflict, if 'hg histedit'-ed changes are located near lines in which keywords are embedded, because keywords are substituted with other strings in the working directory. This patch suppresses keyword expansion while 'hg histedit' for internal merge by adding 'histedit' to 'restricted' command list like 'merge'. Test in this patch just swaps order of revision #13 and #14: this is enough to cause internal merge.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 05 Jun 2014 16:47:14 +0900
parents 25e572394f5c
children 1a5211f2f87f
line wrap: on
line source

# 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])