Why merging uses so much traffic?

Asked by anatoly techtonik

I am working on a plugin for Code::Blocks. It base code resides in lp:codeblocks trunk, but I've took it from unversioned source distribution and created a separate bazaar branch in lp:~techtonik/codeblocks/devpak-plugin

Plugin branch duplicates directory tree structure of the main repository, but contains only plugin files excluding all other stuff. So, the path to plugin code in both repositories is:

Now I want to merge changes from trunk made to this plugin into my copy. I haven't found any references to "sparse checkouts" (http://svnbook.red-bean.com/nightly/en/svn.advanced.sparsedirs.html) and to avoid flooding my branch with other code from Code::Blocks repo I decided to operate only in plugin subdirectory.

I went to src/plugins/contrib/devpak_plugin and issued a command:
bzr merge -Dhttp -v --preview https://code.launchpad.net/codeblocks/src/plugins/contrib/devpak_plugin

After an hour and a half I see a lot of partial downloads occuring. Even though the plugin is hardly 300kB in size and about 1Mb with historical changes involved, there are a lot of downloads happen with size of 4Mb or more. Seems like the whole repository is downloaded and compared to my files. Is it a bug or intended behavior?

Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
anatoly techtonik (techtonik) said :

Another weird thing that the process is finally ended with this message:

bzr: ERROR: Branches have no common ancestor, and no merge base revision was specified.

Revision history for this message
Martin Pool (mbp) said :

The error about "no common ancestor" is because you initialized your branch separately, so it has no common ancestor with the main branch. This is really not a good idea; bzr is not going to work well at these kind of merges at present.

There is some work towards "filtered views" with only some directories present but it's not in a released version yet.

The url you give seems to be of a file inside that branch. For me, I get an error within a reasonable amount of time:

mbp@lithe% bzr --no-plugins branch https://code.launchpad.net/codeblocks/src/plugins/contrib/devpak_plugin
bzr: ERROR: Not a branch: "https://code.launchpad.net/codeblocks/src/plugins/contrib/devpak_plugin/".
zsh: exit 3 bzr --no-plugins branch
bzr --no-plugins branch 0.96s user 1.00s system 54% cpu 3.629 total

I'm trying to branch it myself and it seems to be making reasonable progress.

It's possible that something about your case is making it search for an unreasonably large amount of data across the network, which would be a bug.

What I suggest you do now is:

 make a repository with init-repo
 branch the whole upstream branch into a directory within it called trunk
 branch that, also within the repository, to a new branch of your own
 integrate (using a merge tool or diff&patch) your changes into that branch and commit them

Then from that point on you should be able to merge to and from the trunk.

Can you help with this problem?

Provide an answer of your own, or ask anatoly techtonik for more information if necessary.

To post a message you must log in.