how do you merge unrelated branches?

Marius Kruger amanic at gmail.com
Thu Aug 2 20:55:57 BST 2007


Hi all,

I'm sorry if this has been dealt with previously, but I could not find help
about this
in the mailing list or on the web site.

I'm trying to merge two unrelated branches,
which have quite a number of directories in common.

The problem is that if I do something like
$ bzr merge -r 0..-1 ../other_branch/

I get quite a number of conflicts (see them at the end if you're interested)

BEFORE I do it, my root-folders look like this:
build
module-libraries
module-library-jar
modules
unittest
web-root

AFTER my root-folders look like this:
build
build.moved
module-libraries
module-libraries.moved
module-library-jar
module-library-jar.moved
modules
unittest
web-root
web-root.moved

and that is just the root.
I then have to manually merge the directories.
Isn't there a easier way to do this?
(Even if I have to do some hacking.)
Maybe I can add an option which will in stead of
moving this branch's folders to .moved,
rather move the other branch's file's into this branch's folders.
i.e:
branch1/a/f1
branch1/a/f2
+
branch2/a/f2
branch2/a/f3
 =
branch1/a/f1
branch1/a/f2.THIS
branch1/a/f2.BASE
branch1/a/f2.OTHER
branch1/a/f3

NOT:

branch1/a.moved/f1
branch1/a.moved/f2
branch1/a/f2
branch1/a/f3

I also tried John's merge-into, but it didn't really work for me,
for one I cant specify the branch root as the SUBDIR.

I hope you can help me and that there is a easy answer.

regards
marius



--
$ bzr merge -r 0..-1 ../other_branch/
+N  .bzrignore
+N  build/
+N  build/build.xml
+N  module-libraries/
+N  module-libraries/TextModuleLibrary.xml
+N  module-libraries/TextModuleLibraryUnitTests.xml
+N  module-library-jar/
+N  module-library-jar/classes/
+N  module-library-jar/src/
+N  module-library-jar/src/za/
+N  module-library-jar/src/za/co/
+N  module-library-jar/src/za/co/enerweb/
+N  module-library-jar/src/za/co/enerweb/enerbench/
+N  module-library-jar/src/za/co/enerweb/enerbench/complex_property/
+N  module-library-jar/src/za/co/enerweb/enerbench/complex_property/editor/
+N
module-library-jar/src/za/co/enerweb/enerbench/complex_property/editor/text/
+N
module-library-jar/src/za/co/enerweb/enerbench/complex_property/editor/text/TextTemplateEditor.java
+N
module-library-jar/src/za/co/enerweb/enerbench/complex_property/editor/text/TextTemplatePropertyEditor.java
+N  module-library-jar/src/za/co/enerweb/enerbench/complex_property/type/
+N
module-library-jar/src/za/co/enerweb/enerbench/complex_property/type/text/
+N
module-library-jar/src/za/co/enerweb/enerbench/complex_property/type/text/TextTemplate.java
+N  module-library-jar/src/za/co/enerweb/enerbench/modules/
+N  module-library-jar/src/za/co/enerweb/enerbench/modules/string/
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/GetStringArrayElementModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/RegularExpressionMatchModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/RegularExpressionModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/RegularExpressionReplaceModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/RegularExpressionSplitModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/RelationalConditionModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/SimpleStringModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/StringModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/StringModule2.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/TextOrderModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/conversions/
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/conversions/ByteArrayToStringModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/conversions/String2ByteArrayModule.java
+N  module-library-jar/src/za/co/enerweb/enerbench/modules/string/generator/
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/generator/GloballyUniqueIDentifierGeneratorModule.java
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/string/regex_quickref.html
+N  module-library-jar/src/za/co/enerweb/enerbench/modules/text/
+N
module-library-jar/src/za/co/enerweb/enerbench/modules/text/TextTemplateModule.java
+N  unittest/
+N  unittest/classes/
+N  unittest/src/
+N  web-root/
+N  web-root/WEB-INF/
+N  web-root/WEB-INF/classes/
+N  web-root/WEB-INF/lib/
+N  web-root/WEB-INF/src/
+N  web-root/WEB-INF/web.xml
+N  web-root/css/
+N  web-root/html/
+N  web-root/html/module_help/
+N  web-root/img/
+N  web-root/img/add.png
+N  web-root/img/boolean.png
+N  web-root/img/constant.png
+N  web-root/img/decrease_granularity.png
+N  web-root/img/default.png
+N  web-root/img/delete_medium.png
+N  web-root/img/divide.png
+N  web-root/img/filter.png
+N  web-root/img/increase_granuality.png
+N  web-root/img/move.png
+N  web-root/img/multiply.png
+N  web-root/img/power.png
+N  web-root/img/random.png
+N  web-root/img/round.png
+N  web-root/img/subtract.png
+N  web-root/img/text.png
+N  web-root/img/text_relation.png
+N
web-root/img/za.co.enerweb.krugepj.timeseries.filter.FilterBooleanLeaf.png
+N
web-root/img/za.co.enerweb.krugepj.timeseries.filter.FilterLogicalOperationBranch.png
+N
web-root/img/za.co.enerweb.krugepj.timeseries.filter.FilterOnDayInYearLeaf.png
+N
web-root/img/za.co.enerweb.krugepj.timeseries.filter.FilterOnDayOfWeekLeaf.png
+N
web-root/img/za.co.enerweb.krugepj.timeseries.filter.FilterOnValueLeaf.png
+N  web-root/js/
R   .bzrignore => .bzrignore.moved
R   build/ => build.moved/
R   module-libraries/ => module-libraries.moved/
R   module-library-jar/ => module-library-jar.moved/
R   unittest/ => unittest.moved/
R   web-root/ => web-root.moved/
Conflict adding file .bzrignore.  Moved existing file to .bzrignore.moved.
Conflict adding file build.  Moved existing file to build.moved.
Conflict adding file module-libraries.  Moved existing file to
module-libraries.moved.
Conflict adding file module-library-jar.  Moved existing file to
module-library-jar.moved.
Conflict adding file unittest.  Moved existing file to unittest.moved.
Conflict adding file web-root.  Moved existing file to web-root.moved.
6 conflicts encountered.



-- 
bazaar-vcs.org
Because I don't trust Version Control Systems with less than 6953 unit
tests.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20070802/75b8a750/attachment-0001.htm 


More information about the bazaar mailing list