Convert from local to shared
Neil Martinsen-Burrell
nmb at wartburg.edu
Mon Jun 15 03:08:11 BST 2009
On 2009-06-14 04:03 , James Mansion wrote:
> I'm playing with bzr on Vista using the format that has EOL conversion.
> I've been using local repositories rooted in each dev project.
>
> Now, I'd like to centralise things with a smart server so I can share with
> assorted VMs under vbox or vmware - some of which don't have any
> support for shared folders under virtualisation.
>
> Some questions if I may:
>
> 1) Is a smart server the most practical Vista-hosted central repository
> engine? (I'd really prefer something that can run as a service: its how
> I use svn at the moment: is that possible?)
I prefer using the smart server tunneled over SSH (called
bzr+ssh://server/path) since SSH is so easy to set up on Linux, where my
central repositories are hosted, but I think that setting up SSH on
Vista should be well documented and you could then use that as an access
method for all of your clients.
> 2) I use a format with EOL native in my testing - theer is a suggestion
> in the docs that the format requirements for a smart server are a bit
> different - I really want the EOL handling, but will that be a factor only
> in the client branches, and the smart server format is independent of
> rhem?
Right. The format in the branch's internal storage should be
consistently LF only. (If this is not currently the case, it may take
some work to get it there.) Then, using EOL support, you can check out
with different line endings on different platforms. The best practice
for this differs between projects, with some people using LF in all of
their working copies on every platform and checking consistency in a
commit hook, while other people use native line endings in their working
copies and depend on the format conversion plugin to do the right thing.
> 3) How can I export the contents of my existing repositories and push
> them into the central one? I'd like to take across the whole history if
> possible. bzr send and then merge look possible but maybe I should pull?
> Its not clear to me how to do this since there is no branch relationship,
> I really want a 'dump the lot' and import.
``bzr branch`` is all you need. For example, if I have a local,
standalone branch in /tmp/project and a shared repository in /bzr/ on
the machine server.example.com, I would use ``bzr branch /tmp/project
bzr+ssh://server.example.com/bzr/project``. I think that this ease of
branch movement, requiring no dumping or similar Subversion baggage is
one of the best features of DVCS and Bazaar in particular.
> 4) Is there a way to disable particular plugins in a given directory tree?
> I tried to use bzrto manage local changes to a directory tree that uses
> svn to sync with the upstream repo, and it was assuming I wanted to use
> svn as a backend. I had to remove the bzr-svn plugin directory to do
> what I wanted, but that might reflect ignorance of a better way. (Also,
> a new bzr 1.15.1 install couldn't work with the latest svn I had installed,
> which was annoying)
I don't know of a way to do this. On UNIX, I would just ``mv
~/.bazaar/plugins/svn ~/.bazaar/svn-moved`` and then move it back into
the plugins folder when I was done working with that particular
directory. This workflow of managing local changes to Subversion
upstream projects can also be done more cleanly using bzr-svn directly::
$ bzr branch svn://svn.example.com/project/trunk project-upstream
$ bzr branch project-upstream local
$ cd local; #hack, hack, hack
$ bzr commit ...
$ cd ../project-upstream; bzr pull # gets latest changes
$ cd ../local; bzr merge # pulls changes into local
# resolve conflicts
$ bzr ci -m 'got changes from upstream'
In fact, if you want to contribute changes back to upstream, this
workflow allows you to do so using ``bzr send`` to submit patches.
-Neil
More information about the bazaar
mailing list