Re: Multiple branches and git-svn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 21, 2007 at 11:56:11AM +0000, David Watson wrote:
> Now, I'm not sure this is 100% the fault of git-svn. Perhaps keeping its
> metadata about which SVN branch it's connected to isn't the best thing, but
> git-merge is doing exactly what you ask for. Perhaps we need a merge command in
> git-svn that does the right thing? Although what that right thing would be, I'm
> not quite sure.  Either way, there needs to be a BIG GIGANTIC WARNING in the
> git-svn manual that if you actually use git for what it claims to be great at
> (i.e., merging) you may be in for a world of pain, with your coworkers and boss
> coming at you with pitchforks and torches. Especially because there are
> so many git users who need to interoperate with SVN.

  IMHO here is what git-svn should do. It should use the not-so-new
remotes mechanism, and have all the svn remotes branches under a remote
namespace, clean, simple, and also knowing which "upstream" svn "thing"
it's following.

  Then, when you just git checkout --track -b <branch> <svn-remote/foo>

  hack hack hack
  git commit
  hack hack hack
  git commit
  git merge <svn-remote/another-branch>
  hack hack hack
  git commit

  and then you just want to:

  git svn dcommit.

  Using the fact that <branch> tracks <svn-remote/foo> and that
<svn-remote/foo> is in fact the plain mirror of upstream's branch foo,
it should be able to know where to actually commit and wrt what it has
to make history clean.


  IMHO a git-$scm gateway just has to feed "remotes" branches, and
provide some plumbing commands (like dcommit) to be able to feed some
changes to the other $scm, with a workflow like this one:

  1. pull $scm into a shadow git repository
  2. import/merge $scm changes into your local branch
  3. make changes / merges whatever
  4. push $scm..<yourbranch> into $scm
  5. goto 1, so that you can "win" your changes from 4. back in the $scm
     local shadow repository.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@xxxxxxxxxx
OOO                                                http://www.madism.org

Attachment: pgp2nsU9E297J.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux