[sword-devel] using a dvcs for module creation
Greg Hellings
greg.hellings at gmail.com
Thu Sep 16 07:59:44 MST 2010
On Thu, Sep 16, 2010 at 9:44 AM, Peter von Kaehne <refdoc at gmx.net> wrote:
> Thanks to Matthew who has got me onto the idea to use a DVCS for module
> creation. This is a very useful idea particularly if the underlying
> texts are messy and need gradual adjustment at a variety of places.
>
> So, I fell for git, largely because the name appealed to me and it works
> so far quite well.
>
> My question: If I want to push intermittently point releases - like "NT
> completed", "with book introductions", "with footnotes" etc to a central
> server of what do I need to have for that? I.e. what does the remote
> server need installed? I want to set up my home server as a backup etc
> for that.
For the two DVCS that I've worked with, all you /need/ for doing
personal work like that is SSH. Then you can push with something like
bzr push ssh://myserver.com/~/myrepository
or with git something like
git remote add home ssh://myserver.com/~/myrepository
git push origin home
(or something like that - I don't follow git as often as I probably should).
>
> And how can I use git to mess about with code at home but then commit to
> svn - e.g. the sword-tools section on CrossWire? At the moment I have
> two directories - one is sword-tools under svn where I check out from
> CrossWire and commit from too and another is a git based one. Whenever I
> think i have something worth pushing to CrossWire, I copy from one to
> the other and do a svn commit. I am sure this is not the most clever way...
I haven't had to maintain a git-svn bridge, but in Bazaar it would be
something like this
bzr init-repo sword-tools/
cd sword-tools
bzr co http://svn.crosswire.org/svn/sword-tools/trunk svn
Now I have the directory structure
sword-tools/
---svn/
When I want to branch to edit something I will
cd sword-tools/
bzr branch svn newbranch
cd newbranch
<edit, make sure it's all good, etc>
bzr add # only if I have added new files
bzr commit
cd ../svn
bzr up # exact same as SVN up, makes sure there are not new items on
the remote system
bzr merge ../newbranch
bzr commit
As you see, with the exception of the 'bzr branch' and 'bzr merge',
the commands are identical to the Subversion commands in meaning when
you're using Bazaar as your tool of choice to interface with
Subversion. It also allows you to keep your current strategy of
having parallel directories - one with the canonical Subversion
checkout and the other(s) with whatever you're working on.
I find this to be the most delightful way of working with Subversion -
because I have all the advantages of a DVCS, including I can push and
pull and merge through Launchpad or my personal server or whatever
else I want, without having to twist my mind around a new scheme and
strategy.
When operating off of a native Bazaar repository, there is one tiny
difference in the initial "checkout" and one more command after the
final commit, but you weren't asking about that.
So that's my suggestion - go with Bazaar and save yourself some time
and energy. :)
--Greg
More information about the sword-devel
mailing list