Is the svn-import command for explicit use?

Asked by Perry

re: http://doc.bazaar.canonical.com/latest/en/user-guide/svn_plugin.html

In the documentation at http://doc.bazaar.canonical.com/latest/en/user-guide/svn_plugin.html, in the Central Repository Mirror section, it gives an example of an svn-import command, but then immediately after it gives a revised recipe which doesn't include any use of the string svn-import at all.

Are we supposed to follow the recipe and not use "svn-import" at all? If so, why was the sample invocation of it displayed?

Or are we supposed to figure out to interleave the sample invocation with the recipe? If so, where does the svn-import fit in the recipe?

I'm afraid I am a complete newbie, and simply do not know enough to deduce how these fit together :(

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Per Johansson (per.j) said :
#1

svn-import will convert a whole svn repository to a bzr repository. You give it the repository root, and it will do a best guess as to where all the branches are located and import all of them.

The text "Here’s the recipe from above updated to use a central Bazaar mirror" does not refer to the svn-import line, but to "A simple example" above it. In there, a single svn branch is converted by simply doing a checkout from it.

Basically, svn-import is better if you are converting from svn to bzr and do not plan to go back. If you are a newbie as you say, it is probably better to use the method under "A simple example" if you plan to send the changes back to the svn repository.

Revision history for this message
Perry (perryrapp) said :
#2

> if you plan to send the changes back to the svn repository.

I don't understand the premise of your "if".

I thought this entire page is about the scenario of pushing changes back to the central svn repository. To quote the Overview "...use Bazaar as their VCS client on projects still using a central Subversion repository. "

So the underlying assumption to the entire page is that the objective is to work locally and then push changes back to the central svn repository. So I don't know what you mean by "if you plan to send changes back..." If I didn't plan to do that, this page isn't for me, right?

The second half of the page appears to present an optimized method for large projects, but then the instructions kind of get lost, at least to me -- as I say, it's really unclear (at least to myself) how the user is supposed to interleave the "svn-import" into the recipe given.

You're saying the svn-import isn't part of the recipe?

Can the second half then be broken into two separate recipes, one with svn-import, and one without, and maybe with a bit of English explaining the tradeoffs in deciding which recipe to choose?

Revision history for this message
Per Johansson (per.j) said :
#3

Right. Someone else might be able to give a better answer, but here's my experience from using svn-import.

Every time svn-import is run, and there are new svn revisions to import, it will mirror the svn repository exactly. That means that any commits to the bzr repo which are not in the svn repo will be discarded (they're probably still there, but not in the branch history of any branch). Branches that do not exist in the svn repository are not affected however.

So if you want to use svn-import and still send the changes back upstream, you have to push your changes direct to the svn repository. It would go something like this.

svn-import clones the svn repository to a bzr one.
You clone branches from the bzr repository.
When ready, you push your changes to the svn repository, not the bzr one.
When svn-import is run again the changes will turn up in the bzr repository.

Can you help with this problem?

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

To post a message you must log in.