Oops, forgot the attachments.

Attachment: x.sh
Description: Bourne shell script

# Spoof $HOME to hide the real .mrconfig and .darcs
export HOME=`mktemp -dt with-temp-dir.XXXXXX`
# Also use it as a working area.
cd

# Create two "source" repos.
mkdir x y
darcs init --repodir x
darcs init --repodir y

# Create a "destination" repo.
darcs get x z
Finished getting.
mr register z
Registering darcs repository /tmp/with-temp-dir.fXpmuV/x in 
/tmp/with-temp-dir.fXpmuV/.mrconfig

# mr now associates x (source) with z (destination)
mr update
mr update: /tmp/with-temp-dir.fXpmuV/z
Pulling from "/tmp/with-temp-dir.fXpmuV/x"...
No remote changes to pull in!

mr update: finished (1 ok)

# This sets z/_darcs/prefs/defaultrepo, i.e.  the repo that "darcs
# pull" used when not called with any source repos as arguments.
darcs pull --repodir z $PWD/y
No remote changes to pull in!

# This *SHOULD* still be pulling from x, not y.
mr update
mr update: /tmp/with-temp-dir.fXpmuV/z
Pulling from "/tmp/with-temp-dir.fXpmuV/y"...
No remote changes to pull in!

mr update: finished (1 ok)

Reply via email to