* git-svn aborts with "Use of uninitialized value $u" when a non-svn-backed branch is present in remote
@ 2015-09-22 18:48 Jacob Godserv
2016-06-24 14:44 ` Jacob Godserv
0 siblings, 1 reply; 6+ messages in thread
From: Jacob Godserv @ 2015-09-22 18:48 UTC (permalink / raw)
To: git
I found a specific case in which git-svn improperly aborts:
1. I created a git-svn repository, named "git-svn repo", by cloned an
svn repository via the git-svn tool.
2. I created a normal git repository, named "configuration repo". I
renamed the master branch to "configuration". The initial commit adds
a README and some utility scripts.
3. I created a bare repository, named "master repo".
4. I pushed from the git-svn repo to the master repo.
5. I pushed from the configuration repo to the master repo.
The idea is the configuration branch, which is detached from any
git-svn history, can contain some useful tools, defaults, etc., that I
can share with teammates who want to use git on this svn project. It's
an odd use of git, but it has been working well.
However, a vanilla distribution of Git for Windows 2.5.2 produces the
following error when running any git-svn command, such as "git svn
info", on the cloned master repo:
Use of uninitialized value $u in substitution (s///) at
/mingw64/share/perl5/site_perl/Git/SVN.pm line 105.
Use of uninitialized value $u in concatenation (.) or string at
/mingw64/share/perl5/site_perl/Git/SVN.pm line 105.
refs/remotes/origin/configuration: 'svn+ssh://10.0.1.1/repos/projectA'
not found in ''
In the mentioned SVN.pm file, after the line:
my $u = (::cmt_metadata("$refname"))[0];
I added the following four lines:
if (not defined $u) {
warn "W: $refname does not exist in
SVN; skipping";
next;
}
git-svn appears to operate correctly with this patch. This is my first
time ever editing a perl script, so I apologize if I murdered an
adorable animal just now.
I'm sending this in so more knowledgeable git-svn developers can
comment on this and fix this in the official distribution of git,
assuming there is a bug here to fix.
--
Jacob
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: git-svn aborts with "Use of uninitialized value $u" when a non-svn-backed branch is present in remote
2015-09-22 18:48 git-svn aborts with "Use of uninitialized value $u" when a non-svn-backed branch is present in remote Jacob Godserv
@ 2016-06-24 14:44 ` Jacob Godserv
2016-06-24 19:35 ` Eric Wong
0 siblings, 1 reply; 6+ messages in thread
From: Jacob Godserv @ 2016-06-24 14:44 UTC (permalink / raw)
To: git
On Tue, Sep 22, 2015 at 2:48 PM, Jacob Godserv <jacobgodserv@gmail.com> wrote:
> I found a specific case in which git-svn improperly aborts:
>
> 1. I created a git-svn repository, named "git-svn repo", by cloned an
> svn repository via the git-svn tool.
> 2. I created a normal git repository, named "configuration repo". I
> renamed the master branch to "configuration". The initial commit adds
> a README and some utility scripts.
> 3. I created a bare repository, named "master repo".
> 4. I pushed from the git-svn repo to the master repo.
> 5. I pushed from the configuration repo to the master repo.
>
> The idea is the configuration branch, which is detached from any
> git-svn history, can contain some useful tools, defaults, etc., that I
> can share with teammates who want to use git on this svn project. It's
> an odd use of git, but it has been working well.
>
> However, a vanilla distribution of Git for Windows 2.5.2 produces the
> following error when running any git-svn command, such as "git svn
> info", on the cloned master repo:
>
> Use of uninitialized value $u in substitution (s///) at
> /mingw64/share/perl5/site_perl/Git/SVN.pm line 105.
> Use of uninitialized value $u in concatenation (.) or string at
> /mingw64/share/perl5/site_perl/Git/SVN.pm line 105.
> refs/remotes/origin/configuration: 'svn+ssh://10.0.1.1/repos/projectA'
> not found in ''
>
> In the mentioned SVN.pm file, after the line:
>
> my $u = (::cmt_metadata("$refname"))[0];
>
> I added the following four lines:
>
> if (not defined $u) {
> warn "W: $refname does not exist in
> SVN; skipping";
> next;
> }
>
> git-svn appears to operate correctly with this patch. This is my first
> time ever editing a perl script, so I apologize if I murdered an
> adorable animal just now.
>
> I'm sending this in so more knowledgeable git-svn developers can
> comment on this and fix this in the official distribution of git,
> assuming there is a bug here to fix.
>
> --
> Jacob
This e-mail has gone ignored several months. Is the maintainer of
git-svn on this mailing list? Should I submit this issue elsewhere?
--
Jacob
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: git-svn aborts with "Use of uninitialized value $u" when a non-svn-backed branch is present in remote
2016-06-24 14:44 ` Jacob Godserv
@ 2016-06-24 19:35 ` Eric Wong
[not found] ` <CALi1mtc6Byb39kbAv16vmkUVu3JDdGG4-yVrLroDVraPDxGFng@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2016-06-24 19:35 UTC (permalink / raw)
To: Jacob Godserv; +Cc: git, Christian Couder
Jacob Godserv <jacobgodserv@gmail.com> wrote:
> On Tue, Sep 22, 2015 at 2:48 PM, Jacob Godserv <jacobgodserv@gmail.com> wrote:
> > I found a specific case in which git-svn improperly aborts:
> >
> > 1. I created a git-svn repository, named "git-svn repo", by cloned an
> > svn repository via the git-svn tool.
> > 2. I created a normal git repository, named "configuration repo". I
> > renamed the master branch to "configuration". The initial commit adds
> > a README and some utility scripts.
> > 3. I created a bare repository, named "master repo".
> > 4. I pushed from the git-svn repo to the master repo.
> > 5. I pushed from the configuration repo to the master repo.
> >
> > The idea is the configuration branch, which is detached from any
> > git-svn history, can contain some useful tools, defaults, etc., that I
> > can share with teammates who want to use git on this svn project. It's
> > an odd use of git, but it has been working well.
> >
> > However, a vanilla distribution of Git for Windows 2.5.2 produces the
> > following error when running any git-svn command, such as "git svn
> > info", on the cloned master repo:
> >
> > Use of uninitialized value $u in substitution (s///) at
> > /mingw64/share/perl5/site_perl/Git/SVN.pm line 105.
> > Use of uninitialized value $u in concatenation (.) or string at
> > /mingw64/share/perl5/site_perl/Git/SVN.pm line 105.
> > refs/remotes/origin/configuration: 'svn+ssh://10.0.1.1/repos/projectA'
> > not found in ''
> >
> > In the mentioned SVN.pm file, after the line:
> >
> > my $u = (::cmt_metadata("$refname"))[0];
> >
> > I added the following four lines:
> >
> > if (not defined $u) {
> > warn "W: $refname does not exist in
> > SVN; skipping";
> > next;
> > }
Christian (Cc-ed) also noticed the problem a few weeks ago
and took a more drastic approach by having git-svn die
instead of warning:
http://mid.gmane.org/1462604323-18545-1-git-send-email-chriscool@tuxfamily.org
which landed as commit 523a33ca17c76bee007d7394fb3930266c577c02
in git.git: https://bogomips.org/mirrors/git.git/patch?id=523a33ca17c7
Is dying here too drastic and maybe warn is preferable?
> > git-svn appears to operate correctly with this patch. This is my first
> > time ever editing a perl script, so I apologize if I murdered an
> > adorable animal just now.
> >
> > I'm sending this in so more knowledgeable git-svn developers can
> > comment on this and fix this in the official distribution of git,
> > assuming there is a bug here to fix.
> >
> > --
> > Jacob
>
> This e-mail has gone ignored several months. Is the maintainer of
> git-svn on this mailing list? Should I submit this issue elsewhere?
Sorry, I wasn't paying attention to the list at that time.
It is customary to Cc: authors of the code in question
(that also decentralizes our workflow in case vger is down),
and also acceptable to send reminders after a week or two
in case we're overloaded with other work.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-07-02 10:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22 18:48 git-svn aborts with "Use of uninitialized value $u" when a non-svn-backed branch is present in remote Jacob Godserv
2016-06-24 14:44 ` Jacob Godserv
2016-06-24 19:35 ` Eric Wong
[not found] ` <CALi1mtc6Byb39kbAv16vmkUVu3JDdGG4-yVrLroDVraPDxGFng@mail.gmail.com>
2016-06-24 20:06 ` Eric Wong
2016-06-25 8:39 ` Christian Couder
2016-07-02 10:33 ` [PATCH] git-svn: warn instead of dying when commit data is missing Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox