view tests/test-mq-merge @ 10301:56b50194617f

templates: rename `Last change' column in hgwebdir repository list. This patch changes column headers in the templates that previously said `Last change' to `Last modified'. Neither code nor functionality are changed other than that. For some time now, I have been annoyed by the fact the `Last change' column didn't list the age of the youngest changeset in the repository, or at least tip. It just occurred to me that this is because the wording is slightly misleading; what the column in fact lists is when the repository was last *modified*, that is, when changesets was last added or removed from it. The word `change' can be understood as referring to the changeset itself. Using `changed' would be ever so slightly less amigous. However, the standard nomenclature in this case is `modification date' and `Last modified', which is incidentally entirely unambigous. Hence, `Last modified' is the wording used.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 24 Jan 2010 20:51:53 +0100
parents 9c2c94934f0d
children c52057614c72
line wrap: on
line source

#!/bin/sh

# Test issue 529 - mq aborts when merging patch deleting files

rewrite_path()
{
    sed -e 's:\\:/:g' -e 's:[^ ]*/t/::g'
}

checkundo()
{
    if [ -f .hg/store/undo ]; then
	echo ".hg/store/undo still exists after $1"
    fi
}

echo "[extensions]" >> $HGRCPATH
echo "mq =" >> $HGRCPATH
echo "[mq]" >> $HGRCPATH
echo "git = keep" >> $HGRCPATH

# Commit two dummy files in "init" changeset
hg init t
cd t
echo a > a
echo b > b
hg ci -Am init
hg tag -l init

# Create a patch removing a
hg qnew rm_a
hg rm a
hg qrefresh -m "rm a"

# Save the patch queue so we can merge it later
hg qsave -c -e 2>&1 | rewrite_path
checkundo qsave

# Update b and commit in an "update" changeset
hg up -C init
echo b >> b
hg st
hg ci -m update

# Here, qpush used to abort with :
# The system cannot find the file specified => a
hg manifest
hg qpush -a -m 2>&1 | rewrite_path
checkundo 'qpush -m'
hg manifest

# ensure status is correct after merge
hg qpop -a
cd ..

# Classic MQ merge sequence *with an explicit named queue*
echo
echo % init t2
hg init t2
cd t2
echo '[diff]' > .hg/hgrc
echo 'nodates = 1' >> .hg/hgrc
echo a > a
hg ci -Am init
echo b > a
hg ci -m changea
hg up -C 0
hg cp a aa
echo c >> a
hg qnew --git -f -e patcha
echo d >> a
hg qnew -d '0 0' -f -e patcha2
echo % create the reference queue
hg qsave -c -e -n refqueue 2> /dev/null
hg up -C 1
echo % merge
HGMERGE=internal:other hg qpush -a -m -n refqueue 2>&1 | \
    sed 's/merging with queue at.*refqueue/merging with queue at refqueue/'
echo % check patcha is still a git patch
cat .hg/patches/patcha
echo % check patcha2 is still a regular patch
grep git .hg/patches/patcha2 && echo 'git patch found!'
cd ..