view tests/test-merge9 @ 12039:18e1e7520b67 stable

alias: make shadowing behavior more consistent (issue2054) Currently, given an alias like the following: [alias] summary = summary --remote The alias might be executed - or it might not - depending on the order of the cmdtable dict. This happens because cmdalias gets assigned back to the cmdtable like so: cmdtable['summary'] = ... Yet '^summary|sum' is still in the table, so which one cmdutil.findcmd() chooses isn't deterministic. This patch makes cmdalias assign back to '^summary|sum'. It uses the same cmdtable key lookup that extensions.wrapcommand() does.
author Brodie Rao <brodie@bitheap.org>
date Sat, 21 Aug 2010 22:48:14 -0400
parents 6c82beaaa11a
children
line wrap: on
line source

#!/bin/sh

# test that we don't interrupt the merge session if
# a file-level merge failed

hg init repo
cd repo

echo foo > foo
echo a > bar
hg ci -Am 'add foo'

hg mv foo baz
echo b >> bar
echo quux > quux1
hg ci -Am 'mv foo baz'

hg up -qC 0
echo >> foo
echo c >> bar
echo quux > quux2
hg ci -Am 'change foo'

# test with the rename on the remote side
HGMERGE=false hg merge
hg resolve -l

# test with the rename on the local side
hg up -C 1
HGMERGE=false hg merge

echo % show unresolved
hg resolve -l

echo % unmark baz
hg resolve -u baz

echo % show
hg resolve -l
hg st

echo % re-resolve baz
hg resolve baz

echo % after
hg resolve -l

echo % resolve all warning
hg resolve

echo % resolve all
hg resolve -a

echo % after
hg resolve -l

true