Different svn-id URLs in history
Hi,
After cloning my svn repository, I notice that the svn-id URL is different when going back in history:
git-svn-id: https://server/trunk@300
vs
git-svn-id: https://server/trunk/some_folder/project/src@250
If i checkout the first version, I get a working copy that has the folder "some_folder" in it. If I checkout the latter version, I get a working copy with the contents of the folder "src". Why is this? I thought I always was supposed to get a wc with the whole tree.
Regards,
Knut Eldhuset
Knut Eldhuset venit, vidit, dixit 07.10.2008 12:58:
Quoted 11 lines
Hi,
After cloning my svn repository, I notice that the svn-id URL is different when going back in history:
git-svn-id: https://server/trunk@300
vs
git-svn-id: https://server/trunk/some_folder/project/src@250
Quoted 7 lines
If i checkout the first version, I get a working copy that has the folder "
some_folder" in it. If I checkout the latter version, I get a working copy with the contents of the folder "src". Why is this? I thought I always was supposed to get a wc with the whole tree.Regards,
Knut Eldhuset
I take this is as an invitation for guesswork (given the amount of details)...
You probably have commits which don't follow your usual svn repo layout (trunk/some_folder/project/src) but commit to trunk/ directly. The output of
svn log -v -r300 https://server/trunk@300
svn log -v -r250 https://server/trunk/some_folder/project/src@250
should give some clues.
Michael
Quoted 7 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 07.10.2008 12:58:
Quoted 6 lines
Hi,
After cloning my svn repository, I notice that the svn-id URL is different when going back in history:
git-svn-id: https://server/trunk@300
Quoted 7 lines
Quoted 4 lines
vs
git-svn-id: https://server/trunk/some_folder/project/src@250
I take this is as an invitation for guesswork (given the amount of details)...
Sorry about that... I'm confused.
Quoted 9 lines
You probably have commits which don't follow your usual svn repo layout (trunk/some_folder/project/src) but commit to trunk/ directly. The output of
svn log -v -r300 https://server/trunk@300
svn log -v -r250 https://server/trunk/some_folder/project/src@250should give some clues.
Svn log shows that the same path has been modified in both cases. I see something strange in git, though. Our svn repository has about 6500 commits, but git shows over 10.000. Further investigation shows that a lot of svn commits have two entries in git. Some branches off of trunk do not start at r1, but off of a duplicate rNNNN. Could this be due to our unhealthy practice of creating branches off of subtrees in svn? By this I mean create a branch off of https://server/trunk/some_folder/project/src instead of https://server/trunk. If so, what can be done to fix this?
As a sidenote, during git svn clone, I noticed that each time a new branch or tag was discovered, the "scanning" started back at r1. Is this normal? I would think the history before the branch was already imported. Of course, this could maybe be due to the bad branching practice described above.
Regards,
Knut
Knut Eldhuset venit, vidit, dixit 08.10.2008 08:34:
Quoted 20 lines
Quoted 6 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 07.10.2008 12:58:
Quoted 5 lines
Hi,
After cloning my svn repository, I notice that the svn-id URL is different when going back in history:
Quoted 8 lines
Quoted 6 lines
git-svn-id: https://server/trunk@300
vs
git-svn-id: https://server/trunk/some_folder/project/src@250
I take this is as an invitation for guesswork (given the amount of details)...
Sorry about that... I'm confused.
Quoted 3 lines
You probably have commits which don't follow your usual svn repo layout (trunk/some_folder/project/src) but commit to trunk/ directly. The output of
Quoted 7 lines
Quoted 5 lines
svn log -v -r300 https://server/trunk@300
svn log -v -r250 https://server/trunk/some_folder/project/src@250should give some clues.
Svn log shows that the same path has been modified in both cases. I see
Does "same path" mean:
- same relative to the above paths or
- same absolute path?
Quoted 9 lines
something strange in git, though. Our svn repository has about 6500 commits, but git shows over 10.000. Further investigation shows that a lot of svn commits have two entries in git. Some branches off of trunk do not start at r1, but off of a duplicate rNNNN. Could this be due to our unhealthy practice of creating branches off of subtrees in svn? By this I mean create a branch off of
https://server/trunk/some_folder/project/src instead of
https://server/trunk. If so, what can be done to fix this?
Quoted 5 lines
As a sidenote, during git svn clone, I noticed that each time a new branch or tag was discovered, the "scanning" started back at r1. Is this normal? I would think the history before the branch was already imported. Of course, this could maybe be due to the bad branching practice described above.
svn is typically "abused" in the sense that one svn repo is used for separate projects (your subtrees). git-svn can deal with non-standard repo layouts.
I assume you can't share the svn repo publically, can you? So, in order to help you, we would need to know
- the layout of your svn repo: where are trunk, branches and tags, how did you create branches and tags in svn, are "projects" entirely separate
- your incarnation of git-svn
Michael
Quoted 22 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 08.10.2008 08:34:
Quoted 21 lines
Quoted 5 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 07.10.2008 12:58:
Quoted 4 lines
Hi,
After cloning my svn repository, I notice that the svn-id URL is different when going back in history:
Quoted 8 lines
Quoted 6 lines
git-svn-id: https://server/trunk@300
vs
git-svn-id: https://server/trunk/some_folder/project/src@250
I take this is as an invitation for guesswork (given the amount of details)...
Sorry about that... I'm confused.
Quoted 6 lines
You probably have commits which don't follow your usual svn repo layout (trunk/some_folder/project/src) but commit to trunk/ directly. The output of
svn log -v -r300 https://server/trunk@300
svn log -v -r250 https://server/trunk/some_folder/project/src@250
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
should give some clues.
Svn log shows that the same path has been modified in both cases. I see
Does "same path" mean:
- same relative to the above paths or
- same absolute path?
Both say "/trunk/some_folder/project/src/some_file".
Quoted 10 lines
Quoted 4 lines
something strange in git, though. Our svn repository has about 6500 commits, but git shows over 10.000. Further investigation shows that a lot of svn commits have two entries in git. Some branches off of trunk do not start at r1, but off of a duplicate rNNNN. Could this be due to our unhealthy practice of creating branches off of subtrees in svn? By this I mean create a branch off of https://server/trunk/some_folder/project/src instead of https://server/trunk. If so, what can be done to fix this?
As a sidenote, during git svn clone, I noticed that each time a new branch or tag was discovered, the "scanning" started back at r1. Is this normal? I would think the history before the branch was already imported. Of course, this could maybe be due to the bad branching practice described above.
svn is typically "abused" in the sense that one svn repo is used for separate projects (your subtrees). git-svn can deal with non-standard repo layouts.
I assume you can't share the svn repo publically, can you?
Sorry, no.
Quoted 4 lines
So, in order to help you, we would need to know
- the layout of your svn repo: where are trunk, branches and tags, how did you create branches and tags in svn, are "projects" entirely separate
https://server/trunk
https://server/branches
https://server/tags
We really only have one "project" source tree at https://server/trunk/some_folder/project/src
However, once the sources were at
https://server/trunk/some_folder/project/old_source
Therefore we have the following:
$ svn log -v -r4871 https://server/ ------------------------------------------------------------------------ r4871 | nn | 2007-09-25 13:36:25 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project D /trunk/project/old_source/some_file A /trunk/project/src/client/some_file (from /trunk/project/old_source/some_file:4795)
commit-message
------------------------------------------------------------------------
$ svn log -v -r4869 https://server/ ------------------------------------------------------------------------ r4869 | nn | 2007-09-25 13:14:34 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/src A /trunk/project/src/client
commit-message
------------------------------------------------------------------------
$ svn log -v -r4868 https://server/ ------------------------------------------------------------------------ r4868 | nn | 2007-09-25 13:14:28 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project
commit-message
------------------------------------------------------------------------
$ svn log -v -r4867 https://server/ ------------------------------------------------------------------------ r4867 | nn | 2007-09-25 12:04:58 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/some_file
commit-message
------------------------------------------------------------------------
r4868 appears twice in git. One commit is on master/trunk and has parent and child, while the other is on a branch and has no parent.
Quoted 2 lines
- your incarnation of git-svn
# git --version git version 1.6.0.2
Regards,
Knut
Quoted 103 lines · Knut Eldhuset
Quoted 22 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 08.10.2008 08:34:
Quoted 21 lines
Quoted 5 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 07.10.2008 12:58:
Quoted 4 lines
Hi,
After cloning my svn repository, I notice that the svn-id URL is different when going back in history:
Quoted 8 lines
Quoted 6 lines
git-svn-id: https://server/trunk@300
vs
git-svn-id: https://server/trunk/some_folder/project/src@250
I take this is as an invitation for guesswork (given the amount of details)...
Sorry about that... I'm confused.
Quoted 6 lines
You probably have commits which don't follow your usual svn repo layout (trunk/some_folder/project/src) but commit to trunk/ directly. The output of
svn log -v -r300 https://server/trunk@300
svn log -v -r250 https://server/trunk/some_folder/project/src@250Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
should give some clues.
Svn log shows that the same path has been modified in both cases. I see
Does "same path" mean:
- same relative to the above paths or
- same absolute path?Both say "/trunk/some_folder/project/src/some_file".
Quoted 10 lines
Quoted 4 lines
something strange in git, though. Our svn repository has about 6500 commits, but git shows over 10.000. Further investigation shows that a lot of svn commits have two entries in git. Some branches off of trunk do not start at r1, but off of a duplicate rNNNN. Could this be due to our unhealthy practice of creating branches off of subtrees in svn? By this I mean create a branch off of https://server/trunk/some_folder/project/src instead of https://server/trunk. If so, what can be done to fix this?
As a sidenote, during git svn clone, I noticed that each time a new branch or tag was discovered, the "scanning" started back at r1. Is this normal? I would think the history before the branch was already imported. Of course, this could maybe be due to the bad branching practice described above.
svn is typically "abused" in the sense that one svn repo is used for separate projects (your subtrees). git-svn can deal with non-standard repo layouts.
I assume you can't share the svn repo publically, can you?
Sorry, no.
Quoted 4 lines
So, in order to help you, we would need to know
- the layout of your svn repo: where are trunk, branches and tags, how did you create branches and tags in svn, are "projects" entirely separate
https://server/trunk
https://server/branches
https://server/tagsWe really only have one "project" source tree at https://server/trunk/some_folder/project/src
However, once the sources were at
https://server/trunk/some_folder/project/old_sourceTherefore we have the following:
$ svn log -v -r4871 https://server/ ------------------------------------------------------------------------ r4871 | nn | 2007-09-25 13:36:25 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project D /trunk/project/old_source/some_file A /trunk/project/src/client/some_file (from /trunk/project/old_source/some_file:4795)commit-message
------------------------------------------------------------------------$ svn log -v -r4869 https://server/ ------------------------------------------------------------------------ r4869 | nn | 2007-09-25 13:14:34 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/src A /trunk/project/src/clientcommit-message
------------------------------------------------------------------------
$ svn log -v -r4868 https://server/ ------------------------------------------------------------------------ r4868 | nn | 2007-09-25 13:14:28 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/projectcommit-message
------------------------------------------------------------------------
$ svn log -v -r4867 https://server/ ------------------------------------------------------------------------ r4867 | nn | 2007-09-25 12:04:58 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/some_file
Quoted 5 lines
commit-message
------------------------------------------------------------------------r4868 appears twice in git. One commit is on master/trunk and has parent and child, while the other is on a branch and has no parent.
Sorry, that should be r4869.
Quoted 7 lines
Quoted 2 lines
- your incarnation of git-svn
# git --version git version 1.6.0.2
Regards,
Knut
Knut Eldhuset venit, vidit, dixit 08.10.2008 11:20:
Quoted 64 lines
Quoted 23 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 08.10.2008 08:34:
Quoted 22 lines
Quoted 6 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 07.10.2008 12:58:
Quoted 5 lines
Hi,
After cloning my svn repository, I notice that the svn-id URL is different when going back in history:
Quoted 8 lines
Quoted 6 lines
git-svn-id: https://server/trunk@300
vs
git-svn-id: https://server/trunk/some_folder/project/src@250
I take this is as an invitation for guesswork (given the amount of details)...
Sorry about that... I'm confused.
Quoted 6 lines
You probably have commits which don't follow your usual svn repo layout (trunk/some_folder/project/src) but commit to trunk/ directly. The output of
svn log -v -r300 https://server/trunk@300
svn log -v -r250 https://server/trunk/some_folder/project/src@250Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
should give some clues.
Svn log shows that the same path has been modified in both cases. I see
Does "same path" mean:
- same relative to the above paths or
- same absolute path?Both say "/trunk/some_folder/project/src/some_file".
Quoted 14 lines
Quoted 9 lines
something strange in git, though. Our svn repository has about 6500 commits, but git shows over 10.000. Further investigation shows that a lot of svn commits have two entries in git. Some branches off of trunk do not start at r1, but off of a duplicate rNNNN. Could this be due to our unhealthy practice of creating branches off of subtrees in svn? By this I mean create a branch off of
https://server/trunk/some_folder/project/src instead of
https://server/trunk. If so, what can be done to fix this?Quoted 5 lines
As a sidenote, during git svn clone, I noticed that each time a new branch or tag was discovered, the "scanning" started back at r1. Is this normal? I would think the history before the branch was already imported. Of course, this could maybe be due to the bad branching practice described above.
Quoted 5 lines
svn is typically "abused" in the sense that one svn repo is used for separate projects (your subtrees). git-svn can deal with non-standard repo layouts.
I assume you can't share the svn repo publically, can you?
Sorry, no.
Quoted 4 lines
So, in order to help you, we would need to know
- the layout of your svn repo: where are trunk, branches and tags, how did you create branches and tags in svn, are "projects" entirely separate
https://server/trunk
https://server/branches
https://server/tags
Quoted 5 lines
We really only have one "project" source tree at
https://server/trunk/some_folder/project/srcHowever, once the sources were at
https://server/trunk/some_folder/project/old_source
That may be the source of the trouble. In fact, the log below indicates that it is more like the following two paths:
https://server/trunk/project/old_source
https://server/trunk/project/src/client
Quoted 26 lines
Therefore we have the following:
$ svn log -v -r4871 https://server/ ------------------------------------------------------------------------ r4871 | nn | 2007-09-25 13:36:25 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project D /trunk/project/old_source/some_file A /trunk/project/src/client/some_file (from /trunk/project/old_source/some_file:4795)commit-message
------------------------------------------------------------------------$ svn log -v -r4869 https://server/ ------------------------------------------------------------------------ r4869 | nn | 2007-09-25 13:14:34 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/src A /trunk/project/src/clientcommit-message
------------------------------------------------------------------------
Quoted 8 lines
$ svn log -v -r4868 https://server/ ------------------------------------------------------------------------ r4868 | nn | 2007-09-25 13:14:28 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/projectcommit-message
That one is funny. A modified directory but no paths modified underneath. Was this a propset?
Quoted 11 lines
------------------------------------------------------------------------
$ svn log -v -r4867 https://server/ ------------------------------------------------------------------------ r4867 | nn | 2007-09-25 12:04:58 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/some_filecommit-message
------------------------------------------------------------------------
Maybe you're trying too hard to disguise things. Are you really adding some_file right under project here and under project/src/client in r4871?
Quoted 9 lines
r4868 appears twice in git. One commit is on master/trunk and has parent and child, while the other is on a branch and has no parent.
Quoted 2 lines
- your incarnation of git-svn
# git --version git version 1.6.0.2
I actually meant incantation, I guess I should brush up on my little latin, uhm ;)
So, did you use something like
git svn init -s https://server/
or
git svn init -T trunk/project/src/client -t 'tags/*/project/src/client' -b 'branches/*/project/src/client' https://server/
My suggestion would to use two svn sections (option "-R") with different configs for different repo structures, and to fetch the first one with "-r1:4866" and the second one with "-r4871:HEAD". Reorganising the svn repo layout can confuse git-svn quite a bit (and understandably so). Using different configs for different "epochs" helps. grafts are your friend when it comes to connecting the two.
Michael
Quoted 3 lines · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 08.10.2008 11:20:
Quoted 2 lines
Quoted 1 line · Michael J Gruber
Knut Eldhuset venit, vidit, dixit 08.10.2008 08:34:
<snip>
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
So, in order to help you, we would need to know
- the layout of your svn repo: where are trunk, branches and tags, how did you create branches and tags in svn, are "projects" entirely separate
https://server/trunk
https://server/branches
https://server/tagsWe really only have one "project" source tree at https://server/trunk/some_folder/project/src
Quoted 9 lines
Quoted 2 lines
However, once the sources were at
https://server/trunk/some_folder/project/old_sourceThat may be the source of the trouble. In fact, the log below indicates that it is more like the following two paths:
https://server/trunk/project/old_source
https://server/trunk/project/src/client
I think my description is correct, but these particular log messages may not be the best examples. We did have files and folders in "old_source" that moved to "src".
Quoted 32 lines
Quoted 32 lines
Therefore we have the following:
$ svn log -v -r4871 https://server/ ------------------------------------------------------------------------ r4871 | nn | 2007-09-25 13:36:25 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project D /trunk/project/old_source/some_file A /trunk/project/src/client/some_file (from /trunk/project/old_source/some_file:4795)commit-message
------------------------------------------------------------------------$ svn log -v -r4869 https://server/ ------------------------------------------------------------------------ r4869 | nn | 2007-09-25 13:14:34 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/src A /trunk/project/src/clientcommit-message
------------------------------------------------------------------------
$ svn log -v -r4868 https://server/ ------------------------------------------------------------------------ r4868 | nn | 2007-09-25 13:14:28 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project
Quoted 6 lines
Quoted 2 lines
commit-message
That one is funny. A modified directory but no paths modified underneath. Was this a propset?
These give identical output:
svn log -v -r4868 --xml https://server
and
svn log -v -r4868 --with-all-revprops --xml https://server
I don't understand what happened there. It was a commit made with svk, so maybe that had something to do with it.
Quoted 9 lines
Quoted 9 lines
------------------------------------------------------------------------
$ svn log -v -r4867 https://server/ ------------------------------------------------------------------------ r4867 | nn | 2007-09-25 12:04:58 +0200 (Tue, 25 Sep 2007) | 3 lines Changed paths: M /trunk/project A /trunk/project/some_file
Quoted 6 lines
Quoted 2 lines
commit-message
------------------------------------------------------------------------Maybe you're trying too hard to disguise things. Are you really adding
some_fileright under project here and under project/src/client in r4871?
No, those were different files... I'm sorry I can't share the repo publicly.
Quoted 10 lines
Quoted 6 lines
r4868 appears twice in git. One commit is on master/trunk and has parent and child, while the other is on a branch and has no parent.
Quoted 2 lines
- your incarnation of git-svn
# git --version git version 1.6.0.2I actually meant incantation, I guess I should brush up on my little latin, uhm ;)
Quoted 9 lines
So, did you use something like
git svn init -s https://server/
or
git svn init -T trunk/project/src/client -t 'tags/*/project/src/client' -b 'branches/*/project/src/client' https://server/
I used
git svn clone -s https://server/
initially. Then I tried
git svn clone -T trunk/project/src -r tags -b branches https://server/
which gave better results. Then I settled on using "-r4869:HEAD".
Quoted 8 lines
My suggestion would to use two svn sections (option "-R") with different configs for different repo structures, and to fetch the first one with "-r1:4866" and the second one with "-r4871:HEAD". Reorganising the svn repo layout can confuse git-svn quite a bit (and understandably so). Using different configs for different "epochs" helps. grafts are your friend when it comes to connecting the two.
Michael
Good suggestion. I didn't realize one could do it that way.
Regards,
Knut
Quoted 4 lines · Michael J Gruber
svn is typically "abused" in the sense that one svn repo is used for separate projects (your subtrees). git-svn can deal with non-standard repo layouts.
I've decided to give up on cloning the whole svn repo. Cloning just our src folder is sufficient for now, and it does follow a sensible repo layout.
Maybe I'll get back to this if I manage to find a way of reproducing the previously described behavior.
Regards,
Knut