[darcs-users] little bug?

Marc Weber marco-oweber at gmx.de
Wed Jan 31 18:23:22 UTC 2007


=== source (sh) ======
 
	mkdir -p /tmp/darcs
	# everything will happen in this directory
	cd /tmp/darcs 
	rm -fr a b
	 
	REM(){ echo -e "\nREM>        " $*; }
	 
	REM      create repo [a]:
	REM      file [a]:a/a containing a
	REM      file [a]:b/b containing a
	mkdir a
	cd a
	mkdir a
	mkdir b
	echo a > a/a
	echo a > b/b
	darcs initialize
	darcs add -r .
	darcs record --author=a -a -m "in"
	cd ..
	 
	REM      create repo [b]:
	REM      file [b]:b/b containing bb
	mkdir b
	cd b
	mkdir b
	echo bb > b/b
	darcs initialize
	darcs add -r .
	darcs record --author=b -a -m "in von b"
	cd ..
	 
	REM      now I get all patches from a. \(conflicts because b/b has been recorded here, too.\)
	cd b; darcs pull ../a -a ; cd ..
	 
	REM      changing a/a and writing in \{c,d\} in repos \{a,b\}
	echo c > a/a/a
	echo d > b/a/a
	cd a; darcs record --author=a -a -m c; cd ..
	cd b; darcs record --author=b -a -m d; cd ..
	 
	REM      pulling repo from a within b
	cd b; darcs pull -a ../a
 
====== output ===================
 
	REM>         create repo [a]:
	 
	REM>         file [a]:a/a containing a
	 
	REM>         file [a]:b/b containing a
	Finished recording patch 'in'
	 
	REM>         create repo [b]:
	 
	REM>         file [b]:b/b containing bb
	Finished recording patch 'in von b'
	 
	REM>         now I get all patches from a. (conflicts because b/b has been recorded here, too.)
	We have conflicts in the following files:
	./b ./b/b
	Finished pulling and applying.
	 
	REM>         changing a/a and writing in {c,d} in repos {a,b}
	Finished recording patch 'c'
	Finished recording patch 'd'
	 
	REM>         pulling repo from a within b
	Pulling from "../a"...
	 
	darcs failed:  user error (Error applying patch to working dir:
	user error (Error applying hunk to file ./a/a))
	This may have left your working directory an inconsistent
	but recoverable state. If you had no un-recorded changes
	by using 'darcs revert' you should be able to make your <<<<<<<<< (1) 
	working directory consistent again.

(1) I haven't used any revert command? bug?
[b]:a/a contains d thus applying really failed
==========================================

Shouldn't this result in a conflict as
[a]:a/a has been changed to c
[b]:a/a has been changed to d
=> two changes on the same line

Marc



More information about the darcs-users mailing list