git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Wolf <jw@raven.inka.de>
To: git@vger.kernel.org
Subject: Re: git-svn and repository hierarchy?
Date: Thu, 5 Mar 2009 19:05:29 +0100	[thread overview]
Message-ID: <20090305180529.GD11278@raven.wolf.lan> (raw)
In-Reply-To: <eaa105840903041406k36088763w5a70fe1d7458dfb1@mail.gmail.com>

On Wed, Mar 04, 2009 at 05:06:06PM -0500, Peter Harris wrote:
> On Wed, Mar 4, 2009 at 2:27 PM, Josef Wolf wrote:
> > On Tue, Mar 03, 2009 at 07:18:04PM -0500, Peter Harris wrote:
> >>
> >> Sounds like subversion isn't properly caching your credentials, or
> >> your admin is paranoid and turned off the svn credential cache. I
> >> can't remember the last time I had to enter a password.
> >
> > What credential cache are you talking about?  I don't know of any
> > worth to be mentioned.  If you talk about "store-passwords=yes" in
> > subversion's config
> 
> Yes, that's the one.
> 
> > you might be interested to read
> > http://curl.haxx.se/docs/adv_20090303.html
> 
> Not really, since I use svn:// :-)

Doesn't help ;-)  Many applications are using curllib, and all of them
can reveal your .netrc or subversion config.  For example, zypper and
apt use curllib, AFAIR.

> > BTW: The paranoid admin is myself.   ;-)
> > BTW1: I know there's the possibility of client certificates.  But AFAIK,
> >      there's no equivalent to ssh-agent, so it's pointless.
> 
> I thought that this was already a part of svn, but it appears in the
> 1.6 (not quite final yet) release notes: "SSL client certificate
> passphrases can be stored in KWallet, GNOME Keyring, Mac OS Keychain,
> a Windows CryptoAPI encrypted form or in plaintext form."

Ummm, I always found it hard to find their changelog.  At least
http://svn.collab.net/viewvc/svn/trunk/CHANGES?view=markup&pathrev=36138
don't mention those features.  Do you have a pointer?

> > Within svn, the author field seems to be correct (at least, it is
> > identical to those of the commits that were done directly to svn)
> > But when the commits come back to git, it is set to
> > "jw <jw@041dc122-08ea-11de-a769-bddc3e64b585>" with the host-part being
> > the uuid of the svn-repo.
> >
> > Any ideas how to fix that?
> 
> "git help svn" and look for "--authors-file", maybe. I don't use it
> myself, so I'm afraid I can't help with that one.

Ah, I missed that.

> > Oh, and what happens if svn's rev-properties (commit log, author, date...)
> > are changed?
> 
> Too late. git svn will ignore the change to the history, since git
> forces you to rewrite your entire history if any part changes. Cue
> standard "log messages should [not] be mutable" flamewar.
> 
> Ah, here it is... <flamebait version>: Nothing happens. git will
> correctly store your *true* log/author/date, ignoring any and all
> attempts by malicious parties to destroy useful historical
> information.
> 
> Of course, you're a paranoid admin, so you already have a
> pre-revprop-change hook in your svn server that prevents
> log/author/date changes. Right? ;-)

Well, actually it allows the changes for a very limited user group (that
is: only me 8-).  While I agree that author/date should not be changed,
I like to be able to fix silly typos in the log.  After all, we all do
typos now and then ;-)

> > In contrast, working directly against an svn repository is _very_
> > tedious.
> 
> Tell me about it. Fortunately, we have git-svn to save us from the
> default svn client. ;-)

Fortunately, the default client asks me for the password only once when
I commit something.  git-svn is different here ;-)

> (Sorry, couldn't resist pulling that one out of context)

(Me too)

> >  With a dozen commits pending, you have to enter your password
> > about 30..50 times in "git svn dcommit".
> 
> Maybe svn 1.6 will fix that for you?

I don't think the problem is svn here.  Me tends to think git uses
curllib not in the way it was meant to be used.  And git-svn should
reuse the existing connection instead of creating a new one for every
bit it is going to transport.

> >  # 2. move commits from clone to subversion
> >  #
> >  cd git-svn-repos
> >  git svn rebase
> >  git pull ../clone$clone topic-branch   # need rebase?
> 
> Yeah, a "git svn rebase -l" after this line wouldn't hurt, and is
> suggested by "git help svn".
> 
> Or even reverse those two lines, to save adding a third:
>   git pull ../clone$clone topic-branch
>   git svn rebase

With this, I get twice as much conflicts (half of them being spurious).
But the history is linear on the clones, thus reflecting the svn history
more accurately, I guess.

> Alternatively, you can avoid potential pull conflicts by using a
> temporary branch to avoid the merge you are about to throw away with
> rebase -- remember that 'pull' is short for 'fetch && merge':
> 
> git fetch ../clone$clone topic-branch:scratch
> git checkout scratch
> git rebase trunk
> git svn dcommit
> git checkout master
> git svn rebase -l # fast-forward master to where scratch is
> git branch -d scratch
> 
> ...which should result in seeing only the rebase conflict(s). And
> ought to work if cloneN's topic-branch is on a different svn branch
> from master (although you'd need to -D scratch instead of -d).

I guess you meant "git svn rebase trunk", since dcommit complains about
outdated transactions if "git rebase trunk" is used.

Overall, this looks very good, since the history is linear and I get
only spurious conflicts, which I can get rid of with "git rebase --skip".

Maybe there's room for more improvement:  Since the merge is done on a
scratch branch anyway, why not letting the clones _push_ into branches
with random names: cloneX-`uuidgen` or something.  So the clones could
do the push whenever they have net access.  The actual merge can be done
completely decoupled from the push operation.

  reply	other threads:[~2009-03-05 18:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24 22:34 git-svn and repository hierarchy? Josef Wolf
2009-02-25  9:26 ` Michael J Gruber
2009-02-25 23:24   ` Josef Wolf
2009-02-26  1:02     ` Peter Harris
2009-02-27 16:58       ` Josef Wolf
2009-02-27 18:11         ` Peter Harris
2009-02-27 23:58           ` Josef Wolf
2009-02-28  2:41             ` Peter Harris
2009-02-27 17:12   ` Josef Wolf
2009-02-27 17:45     ` Michael J Gruber
2009-02-27 22:05       ` Josef Wolf
2009-02-28 17:59         ` Michael J Gruber
2009-03-03 18:51           ` Josef Wolf
2009-03-03 19:35             ` Peter Harris
2009-03-03 22:36               ` Josef Wolf
2009-03-04  0:18                 ` Peter Harris
2009-03-04 19:27                   ` Josef Wolf
2009-03-04 22:06                     ` Peter Harris
2009-03-05 18:05                       ` Josef Wolf [this message]
2009-03-05 19:48                         ` Peter Harris
2009-03-06 16:10                           ` Josef Wolf
2009-03-06 16:58                             ` Peter Harris
2009-03-06 17:57                               ` Josef Wolf
2009-03-08 20:33                             ` Florian Mickler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090305180529.GD11278@raven.wolf.lan \
    --to=jw@raven.inka.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).