[darcs-devel] [issue760] Test hashed_inventory fails on Linux

Reinier Lamers bugs at darcs.net
Mon Mar 24 18:06:12 UTC 2008


New submission from Reinier Lamers <tux_rocker at reinier.de>:

Under Linux, on the very same MacBook that I do some OS X testing with, "make
check" fails in hashed_inventory.sh with hashed repos:

Running hashed_inventory.sh ...                  FAILED!
Output from failed hashed_inventory.sh:

# We'd just use `diff -x _darcs -r' if -x was portable.
diffx () {
    { find $1 -type f; find $2 -type f; } |
      sed  -e '/.*\/_darcs\//d' -e 's;^[^/]*;;' | sort | uniq |
      {
        while read part; do
            diff -c $1$part $2$part
        done
      }
}

makepristine () {
    rm -rf pristine
    mkdir pristine
    for i in `$DARCS show files --no-files --no-pending`; do
        echo mkdir -p pristine/$i;
        mkdir -p pristine/$i;
    done
    for i in `$DARCS show files --no-directories --no-pending`; do
        echo $DARCS show contents $i ">" pristine/$i;
        $DARCS show contents $i > pristine/$i;
        cat pristine/$i;
    done
}

test $DARCS || DARCS=$PWD/../darcs

rm -rf temp1 temp2 temp3 temp4 temp5
mkdir temp1
cd temp1
$DARCS init --hashed
touch foo
$DARCS add foo
$DARCS rec -m t1 -a -A tester
Finished recording patch 't1'
echo 1 >> foo
$DARCS what -s | grep -v No\ changes
M ./foo +1
$DARCS what -l | grep -v No\ changes
M ./foo +1
$DARCS what -sl | grep -v No\ changes
M ./foo +1
makepristine
$DARCS show files --no-files --no-pending
mkdir -p pristine/.
$DARCS show files --no-directories --no-pending
/mnt/osx/Users/reinier/Source/darcs-unstable/tests-shell-old-fashioned.dir/../darcs
show contents ./foo > pristine/./foo
cd ..

$DARCS get temp1 temp2
Copying patches, to get lazy repository hit ctrl-C...
Finished getting.
cd temp2
$DARCS changes
Mon Mar 24 18:55:29 CET 2008  tester
  * t1
makepristine
$DARCS show files --no-files --no-pending
mkdir -p pristine/.
$DARCS show files --no-directories --no-pending
/mnt/osx/Users/reinier/Source/darcs-unstable/tests-shell-old-fashioned.dir/../darcs
show contents ./foo > pristine/./foo
cd ..

$DARCS get --hashed temp1 temp3
Copying patches, to get lazy repository hit ctrl-C...
Finished getting.
cd temp3
$DARCS changes
Mon Mar 24 18:55:29 CET 2008  tester
  * t1
cp _darcs/hashed_inventory inv
$DARCS optimize
Done optimizing!
diff -c inv _darcs/hashed_inventory
rm inv
makepristine
$DARCS show files --no-files --no-pending
mkdir -p pristine/.
$DARCS show files --no-directories --no-pending
/mnt/osx/Users/reinier/Source/darcs-unstable/tests-shell-old-fashioned.dir/../darcs
show contents ./foo > pristine/./foo
cd ..
cat temp3/pristine/foo

diffx temp2 temp3
diff -rc temp1/pristine temp3/pristine
diff -rc temp2/pristine temp3/pristine

cd temp1
$DARCS record -a -A tester -m t2
Finished recording patch 't2'
$DARCS push ../temp2 -a
Finished applying...
Push successful.
$DARCS push ../temp3 -a
Hash failure in
/mnt/osx/Users/reinier/Source/darcs-unstable/tests-shell-old-fashioned.dir/temp3
of hash 0000000086-b5100d9e939afaf4693896ca15f6307e2f1f22ed2ec256fac1ab3e0e90429d85

darcs failed:  Couldn't fetch
`0000000086-b5100d9e939afaf4693896ca15f6307e2f1f22ed2ec256fac1ab3e0e90429d85'
in subdir pristine.hashed from sources:

thisrepo:/mnt/osx/Users/reinier/Source/darcs-unstable/tests-shell-old-fashioned.dir/temp3
repo:/mnt/osx/Users/reinier/Source/darcs-unstable/tests-shell-old-fashioned.dir/temp1

Apply failed!

----------
messages: 3988
nosy: Serware, beschmi, kowey, tommy, tux_rocker
priority: bug
status: unread
title: Test hashed_inventory fails on Linux
topic: Darcs2, Testing

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue760>
__________________________________


More information about the darcs-devel mailing list