Eric Kow a écrit :
> Eric Kow <kowey@darcs.net> added the comment:
>
> Thanks for the succinct and informative bug report.
>
> May I encourage you to send us a regression test?
> http://wiki.darcs.net/Development/RegressionTests
I lack bandwidth right now, I can't download even the head of
http://darcs.net. I will do it 6 hours from now, when I am home.
Below is the script I intend to send. It seems to work (well, _fail_) as
intended. I didn't made it as short as possible. I preferred to convey a
(probably bogus) use case. Tell me if you'd rather have a concise (and
faster) regression test.
As a side note, I just noticed that a brutal `cp -r` to copy a
repository (for instance to distribute it via email) is a bit error
prone: it leaves the _darcs/pref/author file intact, which is confusing
when secondary authors start to record patches. I made the mistake, and
I think other beginners will make it too. So, is there a preferred
method to distribute initial repositories over e-mail? Is this
documented somewhere?
Loup.
+++++++++++++++++++++++++++++++
failing-issue1790_darcs-send.sh
+++++++++++++++++++++++++++++++
#! /bin/sh
# create the repo
darcs init --repo A
cd A
# setting the author mail address (avoids interactivity)
echo john.doe@example.com > _darcs/prefs/author
# populate A (optional)
echo foo > foo.txt
darcs add foo.txt
darcs record -a -m "foo"
# create a context file to represent A's state
darcs changes --context > ../A.context
cd ..
# copy the repository the hard way.
# normally one would use `darcs get A B` to do that,
# but when no central server is available, this sort of
# hard copy may be perceived as simpler: Just tar xcfz
# the repository and send it via email.
cp -r A B
cd B
# Make sure there is no _darcs/prefs/defaultrepo file
# If there is one even on new repositories, that would
# appear to solve the issue, but I think this is not a
# good solution: the absence of the defaultrepo file
# is useful to indicate the absence of interaction with
# remote repositories.
#
# Of course, at the time of this writing, the following
# line has no effect
rm -rf _darcs/prefs/defaultrepo
# make some further modifications (optional)
echo bar > bar.txt
darcs add bar.txt
darcs record -a -m "bar"
# try to send a patch to the first repository,
# using its context file
darcs send -a -o ../bar.patch --context=../A.context
cd ..
|