Hello,

I've run some of my scripts triggering conflicts with
darcs-2.0.0pre3. It seems to me that at least the conflict fight
scenario is still exponential O(2^N). The times spent on resolving
each new conflict in involved in the conflict fight grow like
this:

user    0m0.052s
user    0m0.052s
user    0m0.048s
user    0m0.048s
user    0m0.056s
user    0m0.072s
user    0m0.044s
user    0m0.072s
user    0m0.096s
user    0m0.152s
user    0m0.260s
user    0m0.472s
user    0m0.864s
user    0m1.688s
user    0m3.328s
user    0m6.576s
user    0m13.421s
user    0m26.138s
user    0m51.935s
user    1m43.626s
user    3m26.669s

--Pekka

#!/bin/bash
#
# Test darcs conflict fight scenario 
#
# Author: Pekka Pessi
#
# Copyright 2007 Nokia Corporation. All rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

NAME=/tmp/conflict-fight-${USER:-id -nu}

function Q () { exit "$@" ; }
alias record="darcs record --ignore-time --all"

shopt -s expand_aliases

rm -rf $NAME && mkdir $NAME && cd $NAME || Q

echo $0 running in `pwd`

mkdir R0 && cd R0 && darcs init || Q
touch f && darcs add f || Q
cat > f <<EOF
a
b
c
d
e
EOF
record -mCommon f || Q

for repo in R1
do
   darcs put ../$repo && cd ../$repo || Q
   cat > f <<EOF
a
b
$repo
c
d
e
EOF
   record -m$repo f || Q
done

all="000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 
018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 
038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 
058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 
078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 
098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 
198 199"

all="000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 
018 019 020 021 022"

cd ../R0 || Q
for i in $all
do
  cat > f <<EOF
a
b
$i
c
d
$i
e
EOF
  record -m p$i f || Q
done

set -x
cd ../R1 || Q
for i in $all
do
  time darcs pull --patch p$i ../R0 --all
  darcs revert --all
  : "Create local change (on top of conflict)"
  sed '3s/[0-9][0-9]*/X'$i'/' < f > f.new && rm f && mv f.new f || Q
  darcs record --ignore-time -m q$i --all f || Q
done
Wed Dec 19 16:46:38 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * resolve conflicts in mv_and_remove_tests.sh.

Tue Dec 18 02:18:26 EET 2007  Dave Love <[EMAIL PROTECTED]>
  * Fix !(...|...) in mv_and_remove_tests.sh.
  Assume the original construct should have been `! ... | ...' and
  replace with a portable version of that.

Tue Dec 18 16:05:08 EET 2007  Dave Love <[EMAIL PROTECTED]>
  * [issue571] Redo last HAVE_TERMIO_H fix.
  Not the most direct fix, but simpler.

Tue Dec 18 14:01:39 EET 2007  Dave Love <[EMAIL PROTECTED]>
  * Fix configure test for gadt type witnesses.

Tue Dec 18 00:51:59 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * use --ignore-times in all tests.
  This is because the hashed repository is a bit pickier, in that
  it no longer checks file lengths when the file modification times
  match.

Tue Dec 18 00:02:37 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * enable modification time checking on hashed repositories.

Sun Dec 16 20:05:03 EET 2007  Dave Love <[EMAIL PROTECTED]>
  * Pass two args to `cmp' in tests, following POSIX.
  Fixes some failures on Solaris.

Mon Dec 17 22:08:55 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * resolve silly conflict with myself.

Mon Dec 17 21:18:09 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * clean up SelectChanges (eliminating Bools)

Mon Dec 17 20:32:34 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * make a few more files compile with type witnesses.

Sun Dec 16 23:52:25 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * fix bug in revert (in writing the unrevert file).

Mon Dec 17 18:48:15 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * make a few more files compile with type witnesses.

Mon Dec 17 00:46:17 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * remove tabs.

Mon Dec 17 00:28:23 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * bump version number preemptively to 2.0.0pre3.

Sun Dec 16 23:40:02 EET 2007  David Roundy <[EMAIL PROTECTED]>
  * fix doc bug in show contents.

Sun Dec 16 22:16:47 EET 2007  David Roundy <[EMAIL PROTECTED]>
  tagged 2.0.0pre2
_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to