On Tue, Nov 25, 2008 at 09:30:51PM +0100, Petr Rockai <[EMAIL PROTECTED]> wrote: > Miklos Vajna <[EMAIL PROTECTED]> writes: > > - conflicts are dropped, just like during the darcs1 -> darcs2 > > conversion (but of course result is the same) > could you please elaborate this point? The darcs1 -> darcs2 conversion, to my > knowledge, only simplifies nested mergers into conflictors, but does not lose > the record of the (resolved) conflict. But yes, there are some cases where > lossy conversion is done (and that's possibly the reason it's hard to make > convert work on multiple branches of same repository)...
Create a sample repo containing a conflict:
$ darcs init --old-fashioned-inventory
$ echo a > file
$ darcs add file
$ darcs rec -a -m a
Finished recording patch 'a'
$ cd ..
$ darcs get test test.tmp
Copying patches, to get lazy repository hit ctrl-C...
Finished getting.
$ cd test
$ echo b > file
$ darcs rec -a -m b
Finished recording patch 'b'
$ cd ../test.tmp
$ echo c > file
$ darcs rec -a -m c
Finished recording patch 'c'
$ cd ../test
$ darcs pull -a ../test.tmp
Backing up ./file(-darcs-backup0)
We have conflicts in the following files:
./file
Finished pulling and applying.
$ echo d > file
$ darcs rec -a -m d
Finished recording patch 'd'
Then:
$ darcs chan -v
Wed Nov 26 01:43:09 CET 2008 [EMAIL PROTECTED]
* d
hunk ./file 1
-a
+d
Wed Nov 26 01:42:50 CET 2008 [EMAIL PROTECTED]
* c
merger 0.0 (
hunk ./file 1
-a
+b
hunk ./file 1
-a
+c
)
Wed Nov 26 01:42:49 CET 2008 [EMAIL PROTECTED]
* b
hunk ./file 1
-a
+b
Wed Nov 26 01:42:48 CET 2008 [EMAIL PROTECTED]
* a
{
addfile ./file
hunk ./file 1
+a
}
Now convert it:
$ darcs convert .
WARNING: the repository produced by this command is not understood by
the darcs 1 program, and patches cannot be exchanged between
repositories in darcs 1 and darcs 2 formats.
Furthermore, darcs 2 repositories created by different invocations of
this command SHOULD NOT exchange patches, unless those repositories
had no patches in common when they were converted. (That is, within a
set of repos that exchange patches, no patch should be converted more
than once.)
This command DOES NOT modify the source repository. It is safe to run
this command more than once on a single repository, but the resulting
repositories will not be able to exchange patches.
Please confirm that you have read and understood the above
by typing `I understand the consequences of my action': I understand the
consequences of my action
lossy conversion of complicated conflict:
merger 0.0 (
hunk ./file 1
-a
+b
hunk ./file 1
-a
+c
)
Finished converting.
And voila:
$ cd test
$ $ darcs chan -v
Wed Nov 26 01:43:09 CET 2008 [EMAIL PROTECTED]
* d
hunk ./file 1
-a
+d
Wed Nov 26 01:42:50 CET 2008 [EMAIL PROTECTED]
* c
hunk ./file 1
-b
+a
Wed Nov 26 01:42:49 CET 2008 [EMAIL PROTECTED]
* b
hunk ./file 1
-a
+b
Wed Nov 26 01:42:48 CET 2008 [EMAIL PROTECTED]
* a
addfile ./file
hunk ./file 1
+a
No reference to 'c', so you lost data.
Of course the converter did print a warning about this, so probably this
is not a bug, and it's intentional.
pgpEIec6Tz3vO.pgp
Description: PGP signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
