Re re: About merging
tnorth at bluewin.ch
tnorth at bluewin.ch
Fri Jun 17 09:06:46 BST 2005
>I assume that in this example... 1 and 2 are two different branches
>and that they have no common history. You simply did "bzr init" in
>both directories, added the files and commited.
>That means that bzr has no way of knowing that file1.php in 1 and
>file1.php in 2 is the same file. After all, the filename is in no way
>an indication that the files are the same.
Right ... sorry
>bzr keeps a generated id for each file. That's the identifier for the file.
>So what happens when you try to merge is that bzr looks for changes
>since the last common point (never in your example). In 1, you added
>file1.php, then bzr tries to do the same in 2, but since file1.php
>already exists, you get a conflict.
Ok. it means that bzr saw the conflict and announced it with an error (which
should have happend for file2 and 3), but applied the patch to file1.php
without keeping a conflict file (backup or diff)?
>So... what you want to do is this. In 1, you go "bzr init; bzr add .;
>bzr commit -m 'added files'".
>Then you do "bzr branch 1 2".
>Then you move 2 to another computer. Now you can edit it, commit,
>move back the directory to the first computer and merge.
>Hope this helps,
Yes, thanks a lot.
one more thing : what is the syntax for merging only some selected patches?
i saw strange lines containing @ (patch id ?) but didn't find anything in
bzr doc about that...
Have a nice day,
>On 6/16/05, Thibault North <tnorth at bluewin.ch> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> I am sorry this is not a patch or a contribution ... (yet ?) but a
>> simple question about merging, one more time :)
>> I tried this on 2 directories :
>> I have :
>> Which contains the same thing. Both are commited, separately.
>> Now let's suppose 2/ is on a laptop and someone works on it. He commits
>> changes into 2/, modifing files and adding test into file2 and 3. File3
>> is empty now.
>> Then, back home with the othe computer which contains 1/, he makes
>> changes on file3. and adds some text. Commit.
>> Good. Now he has two different versions, each having new commits.
>> Last thing to do is to copy file from laptop to other computer and merge.
>> He has now 1/ and 2/ on the computer. in a same directory.
>> Let's merge 2/ into 1/ :
>> $> cd 1/
>> $> bzr merge ../2 .
>> bzr: error: file1.php is already versioned
>> at /home/tnorth/bazaar-ng/bzr.dev/bzrlib/errors.py:41 in bailout()
>> see ~/.bzr.log for debug information
>> Now the question is : what's that error ?
>> Is my merge command correct ?
>> If so, why is file3.php empty, if a patch was commited in 1/ to add
>> stuff after the commit in 2/ which had it empty ?
>> Using bzr 0.0.4.
>> I would really be pleased to know what I did wrong...
>> Thanks a lot,
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.1 (GNU/Linux)
>> -----END PGP SIGNATURE-----
More information about the bazaar