Mercurial > hg
view tests/test-rename-after-merge @ 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 | d821ea464465 |
children |
line wrap: on
line source
#!/bin/sh # Test issue 746: renaming files brought by the # second parent of a merge was broken. echo % create source repository hg init t cd t echo a > a hg ci -Am a cd .. echo % fork source repository hg clone t t2 cd t2 echo b > b hg ci -Am b echo % update source repository cd ../t echo a >> a hg ci -m a2 echo % merge repositories hg pull ../t2 hg merge hg st echo % rename b as c hg mv b c hg st echo % rename back c as b hg mv c b hg st cd .. # Test issue 1476: renaming a first parent file into # another first parent file while none of them belong to # the second parent was broken echo % test issue 1476 hg init repo1476 cd repo1476 echo a > a hg ci -Am adda echo b1 > b1 echo b2 > b2 hg ci -Am changea hg up -C 0 echo c1 > c1 echo c2 > c2 hg ci -Am addcandd echo % merge heads hg merge hg mv -Af c1 c2 echo % commit issue 1476 hg ci -m merge hg log -r tip -C -v | grep copies hg rollback hg up -C . echo % merge heads again hg merge hg mv -Af b1 b2 echo % commit issue 1476 with a rename on the other side hg ci -m merge hg log -r tip -C -v | grep copies