view tests/test-rebase-parameters @ 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 8766fee6f225
children b345b1cc124f
line wrap: on
line source

#!/bin/sh

echo "[extensions]" >> $HGRCPATH
echo "rebase=" >> $HGRCPATH

addcommit () {
    echo $1 > $1
    hg add $1
    hg commit -d "${2} 0" -m $1
}

commit () {
    hg commit -d "${2} 0" -m $1
}

createrepo () {
    hg init a
    cd a
    addcommit "c1" 0
    addcommit "c2" 1
    addcommit "c3" 2

    hg update -C 1
    addcommit "l1" 3
    addcommit "l2" 4
    addcommit "l3" 5

    hg update -C 2
    addcommit "r1" 6
    addcommit "r2" 7
}

createrepo > /dev/null 2>&1
echo "% These fail"
echo
echo "% Use continue and abort"
hg rebase --continue --abort

echo
echo "% Use continue and collapse"
hg rebase --continue --collapse

echo
echo "% Use continue/abort and dest/source"
hg rebase --continue --dest 4

echo
echo "% Use source and base"
hg rebase --base 5 --source 4

echo
echo "% Rebase with no arguments - from current"
hg rebase

echo
echo "% Rebase with no arguments - from the current branch"
hg update 6
hg rebase

echo "% ----------"
echo "% These work"
echo
echo "% Rebase with no arguments (from 3 onto 7)"
hg update -C 5
hg rebase 2>&1 | sed 's/\(saving bundle to \).*/\1/'

echo "% Try to rollback after a rebase (fail)"
hg rollback

createrepo > /dev/null 2>&1
echo
echo "% Rebase with base == '.' => same as no arguments (from 3 onto 7)"
hg update -C 5
hg rebase --base . 2>&1 | sed 's/\(saving bundle to \).*/\1/'

createrepo > /dev/null 2>&1
echo
echo "% Rebase with dest == `hg branch` => same as no arguments (from 3 onto 7)"
hg update -C 5
hg rebase --dest `hg branch` 2>&1 | sed 's/\(saving bundle to \).*/\1/'

createrepo > /dev/null 2>&1
echo
echo "% Specify only source (from 4 onto 7)"
hg rebase --source 4 2>&1 | sed 's/\(saving bundle to \).*/\1/'

createrepo > /dev/null 2>&1
echo
echo "% Specify only dest (from 3 onto 6)"
hg update -C 5
hg rebase --dest 6 2>&1 | sed 's/\(saving bundle to \).*/\1/'

createrepo > /dev/null 2>&1
echo
echo "% Specify only base (from 3 onto 7)"
hg rebase --base 5 2>&1 | sed 's/\(saving bundle to \).*/\1/'

createrepo > /dev/null 2>&1
echo
echo "% Specify source and dest (from 4 onto 6)"
hg rebase --source 4 --dest 6 2>&1 | sed 's/\(saving bundle to \).*/\1/'

createrepo > /dev/null 2>&1
echo
echo "% Specify base and dest (from 3 onto 6)"
hg rebase --base 4 --dest 6 2>&1 | sed 's/\(saving bundle to \).*/\1/'

exit 0