* git-svn: trunk missing, checks out tag instead
@ 2007-07-13 17:24 Bradford Smith
2007-07-13 19:05 ` Fwd: " Bradford Smith
0 siblings, 1 reply; 4+ messages in thread
From: Bradford Smith @ 2007-07-13 17:24 UTC (permalink / raw)
To: git
I am using git-svn version 1.5.3.rc1.4.gaf83 (svn 1.4.3), and I work
with an SVN repository that is layed out like this:
/trunk/proj1/
...
/trunk/proj2/
...
/trunk/testing/
...
/branches/proj1/
...
/branches/proj2/
...
/branches/testing/
/branches/testing/0000-baseline
/tags/proj1/
...
/tags/proj2/
...
/tags/testing/
/tags/testing/0000-baseline-0
I want to track the testing project, so I tried to use this git-svn
command line:
git-svn clone <base-url> -T/trunk/testing -t/tags/testing
-b/branches/testing testing
This appears to work, though I do get this warning message (edited for privacy):
W: Ignoring error from SVN, path probably does not exist: (175002): RA
layer request failed: REPORT request failed on
'/<server_path>/!svn/bc/101': REPORT of '/<server_path>!svn/bc/101':
Could not read chunk size: Secure connection truncated
(https://<myserver>)
When I run 'git branch -a' in the new testing directory I get this:
* master
0000-baseline
0000-baseline@1546
1.0
1.0@1549
1.0@1656
tags/0000-baseline
tags/0000-baseline-0
tags/0000-baseline@1663
Where is the remote branch for trunk? And, why do I have remote
entries for the defunct 1.0 branch that I deleted from svn earlier
today? What's more, the latest changes from /trunk/testing do not
appear in my working directory, and gitk confirms that master is
pointing at the same commit as tags/0000-baseline-0.
If I just try to track the trunk like this:
git-svn clone <base-url>/trunk/testing
Then I get all of the latest changes and 'git branch -a' shows:
* master
git-svn
So that seems OK at least. It just doesn't work when I try to get
branches and tags. For now, I'll just work this way.
FWIW, I suspect this behavior may be related to recent changes I made
to the Subversion repository. I created
/branches/testing/0000-baseline today by copying an _old_ revision of
/trunk/testing. Then I created /tags/testing/0000-baseline-0 by
copying /branches/testing/0000-baseline. No commits have been done on
/testing/trunk since then. Perhaps the recent (probably latest)
commit that copied an OLD version of trunk is somehow confusing
git-svn? Once I commit a change to the subversion trunk, I'll try to
clone trunk, branches, and tags again and post an update to this
message. Maybe it will work then.
Thanks for your help.
Bradford C. Smith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Fwd: git-svn: trunk missing, checks out tag instead
2007-07-13 17:24 git-svn: trunk missing, checks out tag instead Bradford Smith
@ 2007-07-13 19:05 ` Bradford Smith
2007-07-14 19:04 ` Bradford Smith
[not found] ` <f158199e0707141159t290d3aa9g90c6799e98520f56@mail.gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Bradford Smith @ 2007-07-13 19:05 UTC (permalink / raw)
To: git
UPDATE:
I get the same behavior even after checking in a new change on the trunk.
Oh, well...
Bradford
---------- Forwarded message ----------
From: Bradford Smith <bradford.carl.smith@gmail.com>
Date: Jul 13, 2007 1:24 PM
Subject: git-svn: trunk missing, checks out tag instead
To: git@vger.kernel.org
I am using git-svn version 1.5.3.rc1.4.gaf83 (svn 1.4.3), and I work
with an SVN repository that is layed out like this:
/trunk/proj1/
...
/trunk/proj2/
...
/trunk/testing/
...
/branches/proj1/
...
/branches/proj2/
...
/branches/testing/
/branches/testing/0000-baseline
/tags/proj1/
...
/tags/proj2/
...
/tags/testing/
/tags/testing/0000-baseline-0
I want to track the testing project, so I tried to use this git-svn
command line:
git-svn clone <base-url> -T/trunk/testing -t/tags/testing
-b/branches/testing testing
This appears to work, though I do get this warning message (edited for privacy):
W: Ignoring error from SVN, path probably does not exist: (175002): RA
layer request failed: REPORT request failed on
'/<server_path>/!svn/bc/101': REPORT of '/<server_path>!svn/bc/101':
Could not read chunk size: Secure connection truncated
(https://<myserver>)
When I run 'git branch -a' in the new testing directory I get this:
* master
0000-baseline
0000-baseline@1546
1.0
1.0@1549
1.0@1656
tags/0000-baseline
tags/0000-baseline-0
tags/0000-baseline@1663
Where is the remote branch for trunk? And, why do I have remote
entries for the defunct 1.0 branch that I deleted from svn earlier
today? What's more, the latest changes from /trunk/testing do not
appear in my working directory, and gitk confirms that master is
pointing at the same commit as tags/0000-baseline-0.
If I just try to track the trunk like this:
git-svn clone <base-url>/trunk/testing
Then I get all of the latest changes and 'git branch -a' shows:
* master
git-svn
So that seems OK at least. It just doesn't work when I try to get
branches and tags. For now, I'll just work this way.
FWIW, I suspect this behavior may be related to recent changes I made
to the Subversion repository. I created
/branches/testing/0000-baseline today by copying an _old_ revision of
/trunk/testing. Then I created /tags/testing/0000-baseline-0 by
copying /branches/testing/0000-baseline. No commits have been done on
/testing/trunk since then. Perhaps the recent (probably latest)
commit that copied an OLD version of trunk is somehow confusing
git-svn? Once I commit a change to the subversion trunk, I'll try to
clone trunk, branches, and tags again and post an update to this
message. Maybe it will work then.
Thanks for your help.
Bradford C. Smith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Fwd: git-svn: trunk missing, checks out tag instead
2007-07-13 19:05 ` Fwd: " Bradford Smith
@ 2007-07-14 19:04 ` Bradford Smith
[not found] ` <f158199e0707141159t290d3aa9g90c6799e98520f56@mail.gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Bradford Smith @ 2007-07-14 19:04 UTC (permalink / raw)
To: git; +Cc: Eric Wong
TWIMC,
(Cc: to git-svn author, Eric Wong)
I tried it again today, and it worked! Looking at the command more
closely and playing with it a bit I discovered I had written the
command line slightly differently.
This works:
git-svn clone https://my.server.net/repos/path/ -Ttrunk/testing -ttags/testing \
-bbranches/testing testing
This doesn't:
git-svn clone https://my.server.net/repos/path -T/trunk/testing
-t/tags/testing \
-b/branches/testing testing
So, clearly this command is extremely sensitive to where the slashes go.
With the "good" version of the command I get a trunk branch. With the
"bad" version I don't. Either way, I get the defunct 1.0 branch and
the error message mentioned in the original email below.
HTH,
Bradford C, Smith
---------- Forwarded message ----------
From: Bradford Smith <bradford.carl.smith@gmail.com>
Date: Jul 13, 2007 3:05 PM
Subject: Fwd: git-svn: trunk missing, checks out tag instead
To: git@vger.kernel.org
UPDATE:
I get the same behavior even after checking in a new change on the trunk.
Oh, well...
Bradford
---------- Forwarded message ----------
From: Bradford Smith <bradford.carl.smith@gmail.com>
Date: Jul 13, 2007 1:24 PM
Subject: git-svn: trunk missing, checks out tag instead
To: git@vger.kernel.org
I am using git-svn version 1.5.3.rc1.4.gaf83 (svn 1.4.3), and I work
with an SVN repository that is layed out like this:
/trunk/proj1/
...
/trunk/proj2/
...
/trunk/testing/
...
/branches/proj1/
...
/branches/proj2/
...
/branches/testing/
/branches/testing/0000-baseline
/tags/proj1/
...
/tags/proj2/
...
/tags/testing/
/tags/testing/0000-baseline-0
I want to track the testing project, so I tried to use this git-svn
command line:
git-svn clone <base-url> -T/trunk/testing -t/tags/testing
-b/branches/testing testing
This appears to work, though I do get this warning message (edited for privacy):
W: Ignoring error from SVN, path probably does not exist: (175002): RA
layer request failed: REPORT request failed on
'/<server_path>/!svn/bc/101': REPORT of '/<server_path>!svn/bc/101':
Could not read chunk size: Secure connection truncated
(https://<myserver>)
When I run 'git branch -a' in the new testing directory I get this:
* master
0000-baseline
0000-baseline@1546
1.0
1.0@1549
1.0@1656
tags/0000-baseline
tags/0000-baseline-0
tags/0000-baseline@1663
Where is the remote branch for trunk? And, why do I have remote
entries for the defunct 1.0 branch that I deleted from svn earlier
today? What's more, the latest changes from /trunk/testing do not
appear in my working directory, and gitk confirms that master is
pointing at the same commit as tags/0000-baseline-0.
If I just try to track the trunk like this:
git-svn clone <base-url>/trunk/testing
Then I get all of the latest changes and 'git branch -a' shows:
* master
git-svn
So that seems OK at least. It just doesn't work when I try to get
branches and tags. For now, I'll just work this way.
FWIW, I suspect this behavior may be related to recent changes I made
to the Subversion repository. I created
/branches/testing/0000-baseline today by copying an _old_ revision of
/trunk/testing. Then I created /tags/testing/0000-baseline-0 by
copying /branches/testing/0000-baseline. No commits have been done on
/testing/trunk since then. Perhaps the recent (probably latest)
commit that copied an OLD version of trunk is somehow confusing
git-svn? Once I commit a change to the subversion trunk, I'll try to
clone trunk, branches, and tags again and post an update to this
message. Maybe it will work then.
Thanks for your help.
Bradford C. Smith
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] git-svn: remove leading slashes from fetch lines in the generate config
[not found] ` <f158199e0707141159t290d3aa9g90c6799e98520f56@mail.gmail.com>
@ 2007-07-14 19:40 ` Eric Wong
0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2007-07-14 19:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Bradford Smith
We were previously sensitive to leading slashes in the fetch
lines and incorrectly writing them to the config if the user
used them (needlessly) in the command-line.
This fixes the issue and allows us to play nicely with legacy
configs that have leading slashes in fetch lines.
Thanks to Bradford Smith for figuring this out for me:
>
> This works:
>
> git-svn clone https://my.server.net/repos/path/ -Ttrunk/testing
> -ttags/testing -bbranches/testing testing
>
> This doesn't:
>
> git-svn clone https://my.server.net/repos/path -T/trunk/testing
> -t/tags/testing -b/branches/testing testing
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index b3dffcc..299b40f 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1026,7 +1026,9 @@ sub read_all_remotes {
my $r = {};
foreach (grep { s/^svn-remote\.// } command(qw/config -l/)) {
if (m!^(.+)\.fetch=\s*(.*)\s*:\s*refs/remotes/(.+)\s*$!) {
- $r->{$1}->{fetch}->{$2} = $3;
+ my ($remote, $local_ref, $remote_ref) = ($1, $2, $3);
+ $local_ref =~ s{^/}{};
+ $r->{$remote}->{fetch}->{$local_ref} = $remote_ref;
} elsif (m!^(.+)\.url=\s*(.*)\s*$!) {
$r->{$1}->{url} = $2;
} elsif (m!^(.+)\.(branches|tags)=
@@ -1146,6 +1148,7 @@ sub init_remote_config {
unless ($no_write) {
command_noisy('config',
"svn-remote.$self->{repo_id}.url", $url);
+ $self->{path} =~ s{^/}{};
command_noisy('config', '--add',
"svn-remote.$self->{repo_id}.fetch",
"$self->{path}:".$self->refname);
--
Eric Wong
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-14 19:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13 17:24 git-svn: trunk missing, checks out tag instead Bradford Smith
2007-07-13 19:05 ` Fwd: " Bradford Smith
2007-07-14 19:04 ` Bradford Smith
[not found] ` <f158199e0707141159t290d3aa9g90c6799e98520f56@mail.gmail.com>
2007-07-14 19:40 ` [PATCH] git-svn: remove leading slashes from fetch lines in the generate config Eric Wong
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).