[darcs-users] Different contents, same tag

Aaron Kaplan kaplan at cs.rochester.edu
Mon Sep 19 09:01:13 UTC 2005


As the script below demonstrates, it is possible to pull a tag from 
another repo even when the current versions in the two repos are 
different.   Is this a bug, or a quirk in the semantics of tags in darcs?

mkdir A
cd A
darcs init
echo hi > foo
darcs add foo
darcs record --all -m 'create foo'
cd ..
darcs get A B
cd A
darcs tag -m checkpoint
cd ../B
echo bye >> foo
darcs record --all -m 'modify foo'
darcs pull

Now the file foo has different contents in A and in B, but both are 
tagged 'checkpoint'.  This seems dangerously confusing.

If your repo is different in any way from the one you're pulling from, 
pulling a tag should generate a conflict.

Ideally, when interactively pulling a tag into a modified repo, I'd like 
to be given the chance to make a new tag, rather than pulling the 
existing one.  For example, if I'm maintaining a local branch of 
somebody else's software, and they release a new version and tag it 
"release 2.0", when I next do a pull, I'd like to add a tag to my local 
repo that says "my local version of release 2.0".

-Aaron





More information about the darcs-users mailing list