git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
* git svn clone of messy repository
@ 2018-01-11  0:29 Jason Greenbaum
  2018-01-11  9:04 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Greenbaum @ 2018-01-11  0:29 UTC (permalink / raw)
  To: git

Hi,

I'm in the process of using git svn to migrate several repos over to
git and one repo, in particular, has a very challenging format.
During the migration, I would also like to reorganize the repo.  It
looks something like this in svn:

myrepo
  trunk
    project_of_interest
    other_project1
    other_project2
    …
  branches
    FF-1.0
      project_of_interest
      other_project1
      other_project2
      …
   FF-1.1
      project_of_interest
      other_project1
      other_project2
      …

There is also a 'tags' directory at the toplevel, but that's not
important to illustrate the issue I'm having.  What I would like to do
is to migrate ONLY the folder called 'project_of_interest' and
preserve it's trunk, branches, and tags.  I'm not sure this is
possible directly with git svn clone, but here is what I've tried:

git svn clone \
--authors-file=$AUTHORS_FILE \
--prefix="" \
--trunk=trunk/project_of_interest \
--branches=branches/FF-1.0/project_of_interest \
--branches=branches/FF-1.1/project_of_interest \
svn://my-svn-server/myrepo \
project_of_interest.git

The trunk seems to become the 'master' branch just fine, but my svn
branches are not pulled down.  I'm not sure I have the syntax right or
if this is even possible without first reorganizing the svn repo in
place, updating the .git/config file, or by some other means.  Any
help would be much appreciated.  I'm happy to provide more info as
needed.

Thanks,

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git svn clone of messy repository
  2018-01-11  0:29 git svn clone of messy repository Jason Greenbaum
@ 2018-01-11  9:04 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2018-01-11  9:04 UTC (permalink / raw)
  To: Jason Greenbaum; +Cc: git

Jason Greenbaum <jgbaum@lji.org> wrote:
> --trunk=trunk/project_of_interest \
> --branches=branches/FF-1.0/project_of_interest \
> --branches=branches/FF-1.1/project_of_interest \

> The trunk seems to become the 'master' branch just fine, but my svn
> branches are not pulled down.  I'm not sure I have the syntax right or
> if this is even possible without first reorganizing the svn repo in
> place, updating the .git/config file, or by some other means.

By default, the basename ("project_of_interest") is used and you
get collisions.

I think this section of the git-svn manpage should help:

| When using multiple --branches or --tags, 'git svn' does not automatically
| handle name collisions (for example, if two branches from different paths have
| the same name, or if a branch and a tag have the same name).  In these cases,
| use 'init' to set up your Git repository then, before your first 'fetch', edit
| the $GIT_DIR/config file so that the branches and tags are associated
| with different name spaces.  For example:
| 
| 	branches = stable/*:refs/remotes/svn/stable/*
| 	branches = debug/*:refs/remotes/svn/debug/*


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11  0:29 git svn clone of messy repository Jason Greenbaum
2018-01-11  9:04 ` Eric Wong

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox