All of lore.kernel.org
 help / color / mirror / Atom feed
* Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches
@ 2012-01-25 18:04 Christine Bauers
  2012-01-25 19:09 ` Carlos Martín Nieto
  0 siblings, 1 reply; 4+ messages in thread
From: Christine Bauers @ 2012-01-25 18:04 UTC (permalink / raw)
  To: git

Hi there,

I´m trying to migrate a repository from svn to git which branches and 
tags with the following migration script:

git svn clone --no-metadata --stdlayout --A ../users.txt 
svn://host/svn/project/subproject subproject

cd subproject
git config svn.authorsfile ../../users.txt
git svn fetch

git checkout -b branch1 remotes/branch1
git checkout -b branch2 remotes/branch2
git checkout -b branch3 remotes/branch3

git checkout -b src_v1 remotes/tags/src
git checkout master
git tag src src_v1
git branch -D src_v1

git checkout -b WebContent_v1 remotes/tags/WebContent
git checkout master
git tag WebContent WebContent_v1
git branch -D WebContent_v1

and get the follwoing errors:

W: Ignoring error from SVN, path probably does not exist: (160013): 
Filesystem has no item: Datei nicht gefunden: Revision 8966, Pfad 
»subproject«
W: Do not be alarmed at the above message git-svn is just searching 
aggressively for old history.
This may take a while on large repositories
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'remotes/branch1' which can not be resolved 
as commit?
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'remotes/branch2 which can not be resolved as 
commit?
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'remotes/branch3' which can not be resolved 
as commit?
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'remotes/tags/src' which can not be resolved 
as commit?
error: pathspec 'master' did not match any file(s) known to git.
fatal: Failed to resolve 'src_v1' as a valid ref.
error: branch 'src_v1' not found.
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'remotes/tags/WebContent' which can not be 
resolved as commit?
error: pathspec 'master' did not match any file(s) known to git.
fatal: Failed to resolve 'WebContent_v1' as a valid ref.
error: branch 'WebContent_v1' not found.

How do I solve this problem?

Greetings
Christine

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

* Re: Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches
  2012-01-25 18:04 Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches Christine Bauers
@ 2012-01-25 19:09 ` Carlos Martín Nieto
  2012-01-26  8:50   ` Christine Bauers
  2012-01-27  4:34   ` David Barr
  0 siblings, 2 replies; 4+ messages in thread
From: Carlos Martín Nieto @ 2012-01-25 19:09 UTC (permalink / raw)
  To: Christine Bauers; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 3117 bytes --]

On Wed, 2012-01-25 at 19:04 +0100, Christine Bauers wrote:
> Hi there,
> 
> I´m trying to migrate a repository from svn to git which branches and 
> tags with the following migration script:
> 
> git svn clone --no-metadata --stdlayout --A ../users.txt 
> svn://host/svn/project/subproject subproject
> 
> cd subproject
> git config svn.authorsfile ../../users.txt
> git svn fetch
> 
> git checkout -b branch1 remotes/branch1
> git checkout -b branch2 remotes/branch2
> git checkout -b branch3 remotes/branch3
> 
> git checkout -b src_v1 remotes/tags/src
> git checkout master
> git tag src src_v1
> git branch -D src_v1
> 
> git checkout -b WebContent_v1 remotes/tags/WebContent
> git checkout master
> git tag WebContent WebContent_v1
> git branch -D WebContent_v1
> 
> and get the follwoing errors:
> 
> W: Ignoring error from SVN, path probably does not exist: (160013): 
> Filesystem has no item: Datei nicht gefunden: Revision 8966, Pfad 
> »subproject«
> W: Do not be alarmed at the above message git-svn is just searching 
> aggressively for old history.
> This may take a while on large repositories
> fatal: git checkout: updating paths is incompatible with switching branches.
> Did you intend to checkout 'remotes/branch1' which can not be resolved 
> as commit?
> fatal: git checkout: updating paths is incompatible with switching branches.
> Did you intend to checkout 'remotes/branch2 which can not be resolved as 
> commit?
> fatal: git checkout: updating paths is incompatible with switching branches.
> Did you intend to checkout 'remotes/branch3' which can not be resolved 
> as commit?
> fatal: git checkout: updating paths is incompatible with switching branches.
> Did you intend to checkout 'remotes/tags/src' which can not be resolved 
> as commit?
> error: pathspec 'master' did not match any file(s) known to git.
> fatal: Failed to resolve 'src_v1' as a valid ref.
> error: branch 'src_v1' not found.
> fatal: git checkout: updating paths is incompatible with switching branches.
> Did you intend to checkout 'remotes/tags/WebContent' which can not be 
> resolved as commit?
> error: pathspec 'master' did not match any file(s) known to git.
> fatal: Failed to resolve 'WebContent_v1' as a valid ref.
> error: branch 'WebContent_v1' not found.
> 
> How do I solve this problem?

First try to figure out where the problem happens. It could be that
git-svn isn't recognising the branches properly, or that the layout
isn't what it expects or any number of things.

What layout does the repo have? Does it correspond to what git-svn is
expecting? All those error messages come from the fact that you're
telling git some starting points that it can't find. Make sure those
exist and they have the name you're giving. What does `git branch -a`
say? You're presumably not giving us the real names, so we can't tell if
there are problems there.

If you're looking to migrate completely, something like
svn-dump-fast-export ( https://github.com/barrbrain/svn-dump-fast-export
) might get you there better.

   cmn



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches
  2012-01-25 19:09 ` Carlos Martín Nieto
@ 2012-01-26  8:50   ` Christine Bauers
  2012-01-27  4:34   ` David Barr
  1 sibling, 0 replies; 4+ messages in thread
From: Christine Bauers @ 2012-01-26  8:50 UTC (permalink / raw)
  To: Carlos Martín Nieto; +Cc: git

Am 25.01.2012 20:09, schrieb Carlos Martín Nieto:
> On Wed, 2012-01-25 at 19:04 +0100, Christine Bauers wrote:
>> Hi there,
>>
>> I´m trying to migrate a repository from svn to git which branches and
>> tags with the following migration script:
>>
>> git svn clone --no-metadata --stdlayout --A ../users.txt
>> svn://host/svn/project/subproject subproject
>>
>> cd subproject
>> git config svn.authorsfile ../../users.txt
>> git svn fetch
>>
>> git checkout -b branch1 remotes/branch1
>> git checkout -b branch2 remotes/branch2
>> git checkout -b branch3 remotes/branch3
>>
>> git checkout -b src_v1 remotes/tags/src
>> git checkout master
>> git tag src src_v1
>> git branch -D src_v1
>>
>> git checkout -b WebContent_v1 remotes/tags/WebContent
>> git checkout master
>> git tag WebContent WebContent_v1
>> git branch -D WebContent_v1
>>
>> and get the follwoing errors:
>>
>> W: Ignoring error from SVN, path probably does not exist: (160013):
>> Filesystem has no item: Datei nicht gefunden: Revision 8966, Pfad
>> »subproject«
>> W: Do not be alarmed at the above message git-svn is just searching
>> aggressively for old history.
>> This may take a while on large repositories
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/branch1' which can not be resolved
>> as commit?
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/branch2 which can not be resolved as
>> commit?
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/branch3' which can not be resolved
>> as commit?
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/tags/src' which can not be resolved
>> as commit?
>> error: pathspec 'master' did not match any file(s) known to git.
>> fatal: Failed to resolve 'src_v1' as a valid ref.
>> error: branch 'src_v1' not found.
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/tags/WebContent' which can not be
>> resolved as commit?
>> error: pathspec 'master' did not match any file(s) known to git.
>> fatal: Failed to resolve 'WebContent_v1' as a valid ref.
>> error: branch 'WebContent_v1' not found.
>>
>> How do I solve this problem?
> First try to figure out where the problem happens. It could be that
> git-svn isn't recognising the branches properly, or that the layout
> isn't what it expects or any number of things.
>
> What layout does the repo have? Does it correspond to what git-svn is
> expecting? All those error messages come from the fact that you're
> telling git some starting points that it can't find. Make sure those
> exist and they have the name you're giving. What does `git branch -a`
> say? You're presumably not giving us the real names, so we can't tell if
> there are problems there.
>
> If you're looking to migrate completely, something like
> svn-dump-fast-export ( https://github.com/barrbrain/svn-dump-fast-export
> ) might get you there better.
>
>     cmn


Thanks for your answer. I would say the problem happens while cloning the project, because git branch -a and git branch -r says nothing. The question is why aren´t there any branches? Here is the structure of the project:


marketplace

     braches

         lyth_dev

         meinbestand_suche

         umkreis_suche

     tags

         src

         WebContent

     trunk

         src

         WebContent

     trunk_112233

         src

         WebContent

And here again the script:


git svn clone --no-metadata --stdlayout --A ../users.txt svn://host/svn/projects/marketplace marketplace

cd marketplace

git config svn.authorsfile ../../users.txt

git svn fetch

#Checkout Branches

git checkout -b lyth_dev remotes/lyth_dev

git checkout -b meinbestand_suche remotes/meinbestand_suche

git checkout -b umkreis_suche remotes/umkreis_suche


#Checkout der tags

git checkout -b src_v1 remotes/tags/src

git checkout master

git tag src src_v1

git branch -D src_v1

git checkout -b WebContent_v1 remotes/tags/WebContent

git checkout master

git tag WebContent WebContent_v1

git branch -D WebContent_v1

Is there something wrong with this script? Or does the errors maybe occurs because there is a trunk_112233. The log file says the following:

Initialized empty Git repository in c:/project/marketplace/.git/
Checked through r8445
Checked through r8545
Checked through r8645
Checked through r8745
Checked through r8845
Checked through r8945
Checked through r8968
Checked through r8968

And that´s all. It says nothing about references.

Do you have any ideas?

Thanks

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

* Re: Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches
  2012-01-25 19:09 ` Carlos Martín Nieto
  2012-01-26  8:50   ` Christine Bauers
@ 2012-01-27  4:34   ` David Barr
  1 sibling, 0 replies; 4+ messages in thread
From: David Barr @ 2012-01-27  4:34 UTC (permalink / raw)
  To: Carlos Martín Nieto; +Cc: Christine Bauers, git

Hi,

A lot of work has occurred on the version of svn-fe within the git tree.
Jonathan Nieder is the nominal maintainer of that effort.
He has just requested that the most stable set of changes be merged.

--
David Barr

From Jonathan's pull request:

Junio, please pull

 git://repo.or.cz/git/jrn.git svn-fe

to get the following changes since commit
ec014eac0e9e6f30cbbca616090fa2ecf74797e7:

 Git 1.7.5 (2011-04-23 23:36:32 -0700)

up to c5bcbcdcfa1e2a1977497cb3a342c0365c8d78d6:

 vcs-svn: reset first_commit_done in fast_export_init (2011-06-23
10:04:36 -0500)

On Thu, Jan 26, 2012 at 6:09 AM, Carlos Martín Nieto <cmn@elego.de> wrote:
> On Wed, 2012-01-25 at 19:04 +0100, Christine Bauers wrote:
>> Hi there,
>>
>> I´m trying to migrate a repository from svn to git which branches and
>> tags with the following migration script:
>>
>> git svn clone --no-metadata --stdlayout --A ../users.txt
>> svn://host/svn/project/subproject subproject
>>
>> cd subproject
>> git config svn.authorsfile ../../users.txt
>> git svn fetch
>>
>> git checkout -b branch1 remotes/branch1
>> git checkout -b branch2 remotes/branch2
>> git checkout -b branch3 remotes/branch3
>>
>> git checkout -b src_v1 remotes/tags/src
>> git checkout master
>> git tag src src_v1
>> git branch -D src_v1
>>
>> git checkout -b WebContent_v1 remotes/tags/WebContent
>> git checkout master
>> git tag WebContent WebContent_v1
>> git branch -D WebContent_v1
>>
>> and get the follwoing errors:
>>
>> W: Ignoring error from SVN, path probably does not exist: (160013):
>> Filesystem has no item: Datei nicht gefunden: Revision 8966, Pfad
>> »subproject«
>> W: Do not be alarmed at the above message git-svn is just searching
>> aggressively for old history.
>> This may take a while on large repositories
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/branch1' which can not be resolved
>> as commit?
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/branch2 which can not be resolved as
>> commit?
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/branch3' which can not be resolved
>> as commit?
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/tags/src' which can not be resolved
>> as commit?
>> error: pathspec 'master' did not match any file(s) known to git.
>> fatal: Failed to resolve 'src_v1' as a valid ref.
>> error: branch 'src_v1' not found.
>> fatal: git checkout: updating paths is incompatible with switching branches.
>> Did you intend to checkout 'remotes/tags/WebContent' which can not be
>> resolved as commit?
>> error: pathspec 'master' did not match any file(s) known to git.
>> fatal: Failed to resolve 'WebContent_v1' as a valid ref.
>> error: branch 'WebContent_v1' not found.
>>
>> How do I solve this problem?
>
> First try to figure out where the problem happens. It could be that
> git-svn isn't recognising the branches properly, or that the layout
> isn't what it expects or any number of things.
>
> What layout does the repo have? Does it correspond to what git-svn is
> expecting? All those error messages come from the fact that you're
> telling git some starting points that it can't find. Make sure those
> exist and they have the name you're giving. What does `git branch -a`
> say? You're presumably not giving us the real names, so we can't tell if
> there are problems there.
>
> If you're looking to migrate completely, something like
> svn-dump-fast-export ( https://github.com/barrbrain/svn-dump-fast-export
> ) might get you there better.
>
>   cmn

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

end of thread, other threads:[~2012-01-27  4:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 18:04 Git svn migration does not work because fatal git checkout updating paths is incompatible with switching branches Christine Bauers
2012-01-25 19:09 ` Carlos Martín Nieto
2012-01-26  8:50   ` Christine Bauers
2012-01-27  4:34   ` David Barr

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.