view tests/test-convert-bzr-directories @ 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 9e6d6568bf7a
children
line wrap: on
line source

#!/bin/sh

. "$TESTDIR/bzr-definitions"

echo % empty directory
mkdir test-empty
cd test-empty
bzr init -q source
cd source
echo content > a
bzr add -q a
bzr commit -q -m 'Initial add'
mkdir empty
bzr add -q empty
bzr commit -q -m 'Empty directory added'
echo content > empty/something
bzr add -q empty/something
bzr commit -q -m 'Added file into directory'
cd ..
hg convert source source-hg
manifest source-hg 1
manifest source-hg tip
cd ..

echo % directory renames
mkdir test-dir-rename
cd test-dir-rename
bzr init -q source
cd source
mkdir tpyo
echo content > tpyo/something
bzr add -q tpyo
bzr commit -q -m 'Added directory'
bzr mv tpyo typo
bzr commit -q -m 'Oops, typo'
cd ..
hg convert source source-hg
manifest source-hg 0
manifest source-hg tip
cd ..

echo % nested directory renames
mkdir test-nested-dir-rename
cd test-nested-dir-rename
bzr init -q source
cd source
mkdir -p firstlevel/secondlevel/thirdlevel
echo content > firstlevel/secondlevel/file
echo this_needs_to_be_there_too > firstlevel/secondlevel/thirdlevel/stuff
bzr add -q firstlevel
bzr commit -q -m 'Added nested directories'
bzr mv firstlevel/secondlevel secondlevel
bzr commit -q -m 'Moved secondlevel one level up'
cd ..
hg convert source source-hg
manifest source-hg tip
cd ..

echo % directory remove
mkdir test-dir-remove
cd test-dir-remove
bzr init -q source
cd source
mkdir src
echo content > src/sourcecode
bzr add -q src
bzr commit -q -m 'Added directory'
bzr rm -q src
bzr commit -q -m 'Removed directory'
cd ..
hg convert source source-hg
manifest source-hg 0
manifest source-hg tip
cd ..

echo % directory replace
mkdir test-dir-replace
cd test-dir-replace
bzr init -q source
cd source
mkdir first second
echo content > first/file
echo morecontent > first/dummy
echo othercontent > second/something
bzr add -q first second
bzr commit -q -m 'Initial layout'
bzr mv first/file second/file
bzr mv first third
bzr commit -q -m 'Some conflicting moves'
cd ..
hg convert source source-hg
manifest source-hg tip
cd ..