view mercurial/node.py @ 24779:23727465ff72

record: add message when starting record's curses interface We are adding this log message to reduce a confusion when a command prints something just before starting the curses interface. Since the interactive mode is taking over the entire screen, starts with no delay and does wait for a key press, the user believes that messages printed before opening the interactive mode were actually printed after using interactive mode, not before. The fix adds the line "Starting interactive mode" helping the user separate the messages that were printed before and after the start of the interactive mode. One particular example where this was a problem is the revert command where we first print the list of changes to be considered for revert, then opens the curses interface right away without letting the user see the messages. The user then selects the changes, validates and then see the messages from before opening the interactive mode and is confused.
author Laurent Charignon <lcharignon@fb.com>
date Thu, 16 Apr 2015 14:26:50 -0700
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])