All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
To: git@vger.kernel.org
Subject: Coming clean, after being stupid and ugly (or: globs and filtering with git-svn)
Date: Mon, 23 Jun 2008 15:17:47 +0200	[thread overview]
Message-ID: <g3o7ps$32h$1@ger.gmane.org> (raw)

Hi there,

I've been a sinner regarding good repo structures: I lumped a lot of 
stuff into one SVN repo. I blame SVN's clumsy admin commands and URLs 
for that, of course... Along with my transition to git I want to change 
this structure.

At the root of my SVN repo I have directories trunk/A, trunk/B and 
trunk/C, say; similarly for branches/*/A etc.

I know how to "git-svn clone -s" the tree under A so that it becomes an 
independent git repository (using "branches = 
branches/*/A:refs/remotes/*" etc., i.e: git-svn init, edit config, 
git-svn fetch).

But I want the trees under B and C to end up in the same git repository 
(under B and C, of course). I could convert the whole SVN repo and 
remove A afterwards using git-filter-branch, but this changes commit IDs 
and leaves spurious branches, tags and commits which touch the tree 
below A only, and would need to be removed also.

Is there any way to tell git-svn to do the filtering? It does some sort 
of filtering already (evaluating the fetch, branches and tags glob 
patterns). I would need something like

branches/*/{B,C}:refs/remotes/*

or

branches/*/{B,C}:refs/remotes/*/\1

to mean: treat only the trees below branches/something/B and 
branches/something/C and put them into subdirs B resp. C of the same git 
repo in branch something, for each something there is.

Alternatively: Where in git-svn should I look if I wanted to implement 
something like that?

Cheers,
Michael

P.S.: Actually, the tree below A will end up in a tree of smaller repos, 
and in my case I have more than just B and C which should end up in the 
same repo. The description above is a minimal case.

                 reply	other threads:[~2008-06-23 13:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='g3o7ps$32h$1@ger.gmane.org' \
    --to=michaeljgruber+gmane@fastmail.fm \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.