I've published an experimental Git clone of Django's SVN repository
(created with git-svn). If you're a Git user and want to use this
repository, be my guest. Please still upload patches to Trac for
review, but mention you're using my clone so I can more easily apply
patches from you. Also let me know if you publish your clones
anywhere; I'll add 'em as remotes.
Note that this is in no way official, this is just me fooling around
with new tech. It's entirely possible that this won't actually save
anyone any time, but since I'm fooling with Git I thought I'd give
this a shot. Please don't try to turn this into a "Django should use
Git!" thread; if you do I'll just ignore you. We're not switching from
SVN any time in the foreseeable future.
OK, so the details:
Repository: git://djangoproject.com/django
Gitweb: http://code.djangoproject.com/git/?p=django
Jacob
Until I learn more about Git, yes :)
If you know the correct incantation to add other git-svn-created
branches, feel free to school me :)
Jacob
Yeah, hgsvn is one-way, which git-svn has the "dcommit" command
which'll commit back to SVN. I'm really not much of a git fan, but
git-svn makes a better svn than svn does, if you know what I mean.
Jacob
Noted this on the appropriate wiki page (and cleaned up the section on
DVCS mirrors):
Hmmmm....
>hg help convert
hg convert [OPTION]... SOURCE [DEST [REVMAP]]
Convert a foreign SCM repository to a Mercurial one.
...
Accepted destination formats:
- Mercurial
- Subversion (history on branches is not preserved)
That's hg 1.0.1
--
Alexander
True, but that doesn't address pushing changes back to SVN, at least
not practically. Mercurial's own docs [1] admit this is a problem
needing improvement. Compare that with git-svn's dcommit command [2].
[1]: http://www.selenic.com/mercurial/wiki/index.cgi/WorkingWithSubversion#head-15564b76f3172721218d34c912aa0c31e156a94b
[2]: http://www.kernel.org/pub/software/scm/git/docs/git-svn.html
--
----
Waylan Limberg
way...@gmail.com
git-checkout -b local/branchname branchname
There's no magic in the "local" prefix, it's just to distinguish the
remote branch of the same name.
Plus
git-update-server-info
may be needed...
Yes, with bzr-svn. Didn't play too much with that one. But Bazaar is
slow, *really* slow.
--
http://www.marcfargas.com -- will be finished some day.
I settled on Bazaar after extensively using both Git and Mercurial;
it's *not* that slow, and it keeps getting faster with aggressive
monthly releases. (But alas, this isn't the right place for DVCS
advocacy.) ^_^
Use the `-T`, `-t`, `-b` flags, or `-s` if the project has a "standard
layout". This should bring over branches and tags as well.
-Rob
--
"ROCK OUT!" \m/. .\m/
I forgot to reference the man page (which was in my clipboard):
http://www.kernel.org/pub/software/scm/git/docs/git-svn.html
-Rob
Oh, er, uh, I didn't notice only trunk was in the published repo-- I
assumed it was a clone problem.
Yeah, what Rob said, except that for sure, django is in the standard
format, so this should work:
git-svn init -s http://code.djangoproject.com/svn/
But I think that just editing .git/config to add this should work:
[svn-remote "svn"]
url = http://code.djangoproject.com/svn
fetch = trunk:refs/remotes/trunk
branches = branches/*:refs/remotes/*
tags = tags/*:refs/remotes/tags/*
I hope you are nearsighted and the foreseeable future isn't too distant. :)
<!-- Ignore, nothing to see here. Really... don't even waste your time...
I just can't help but think that the "network of trust" that Linus
refers to in his Git talk can only help any open source project. For
example, let's say you trust person X to be the source of your
language updates and pull from his Git tree whenever he has a set of
language updates for you. You just have to trust this one person that
they'll do the right thing for that component or area of Django. That
person may have others he trusts to pull merges from, and everything
bubbles up to the top.
This also removes any sort of special status of committers and
authorizing someone as a committer. Everyone can commit to their own
trees/branches, or experiment with features/fixes/updates all they
want, and if it's good, someone can pull from it.
You already know all the benefits of distributed SCM I'm sure. Plus,
there are obviously some key infrastructure changes that would have to
take place *if* Django were to switch to Git -- like Trac, for
example. So even if Git is an obvious choice over SVN, the
neighboring tools play a big factor as well.
But I'm excited to see the "fooling around with new tech" and hope for
of a Git move one day. :)
-->
-Rob
git-svn init -s http://code.djangoproject.com/svn/django
Unless you want djangoproject.com also ;)
Be advised, though, that currently bzr-svn will dump out a ton of svn
properties into your repo [1]. Then, if you say to yourself "what the
heck just happened!?" and go revert that revision (removing the
properties), you will not be able to ever branch the repo again using
bzr-svn until this bug [2] is fixed. Wish I would have known that
before I did it :)
Gary
[1]
http://samba.org/~jelmer/bzr-svn/FAQ.html#bzr-svn-sets-all-kinds-of-file-properties-when-pushing-revisions-into-subversion-is-this-really-necessary
[2] https://bugs.launchpad.net/bzr-svn/+bug/174690
> If you know the correct incantation to add other git-svn-created
> branches, feel free to school me :)
I think Brian Rosner covered pulling in all branches from svn on his
screencast about django and git [0] but I can't off the top of my
head remember how he did it.
http://oebfare.com/blog/2008/jan/23/using-git-django-screencast/
--
David Reynolds
da...@reynoldsfamily.org.uk
I use git-svnimport, which provides only one-way conversion from svn to git.
It converts all branches. But it's going to be deprecated ...
Anyway, I use it, and I sync hourly from svn. It's available at
git://git.spieleck.de/django
Please send me an email if you plan to use it regularly.
Michael