From: Thomas Rast <trast@student.ethz.ch>
To: Adam Retter <adam@exist-db.org>
Cc: git@vger.kernel.org, "Dannes Wessels" <dannes@exist-db.org>,
"Wolfgang Meier" <wolfgang@exist-db.org>,
"Leif-Jöran Olsson" <ljo@exist-db.org>,
"Eric Wong" <normalperson@yhbt.net>
Subject: Re: git svn error "Not a valid object name"
Date: Sat, 16 Mar 2013 15:13:15 +0100 [thread overview]
Message-ID: <87y5dnv3es.fsf@pctrast.inf.ethz.ch> (raw)
In-Reply-To: CAJKLP9ZQBXf5ZZY9FccOAL5QU+q1b5SnAfvP9BpARdqvzPuWeg@mail.gmail.com
[+Cc Eric]
Adam Retter <adam@exist-db.org> writes:
> $ git svn init -t tags -b stable -T trunk
> file:///home/ec2-user/svn-rsync/code new-git-repo
> $ cd new-git-repo
> $ git config svn-remote.svn.preserve-empty-dirs true
> $ git config svn-remote.svn.rewriteRoot https://svn.code.sf.net/p/exist/code
> $ git svn fetch -A /home/ec2-user/.svn2git/authors.txt
>
> It all started well and was running away for quite some hours, when
> the following error occurred:
>
> fatal: Not a valid object name
> ls-tree -z ./webapp/api/: command returned error: 128
The important observation is that the object name is missing; the error
is misleading in that it simply tells us that what is *taken* for the
object name is invalid.
There appear to be only two uses of ls-tree -z without further options
in git-svn, namely:
SVN/Fetcher.pm:165: my ($tree) = (command('ls-tree', '-z', $self->{c}, "./$gpath")
SVN/Fetcher.pm:197: ($mode, $blob) = (command('ls-tree', '-z', $self->{c}, "./$gpath
In either one, $self->{c} is empty if they fail in this way. And that
seems to come from 'sub new', which says
if (exists $git_svn->{last_commit}) {
$self->{c} = $git_svn->{last_commit};
$self->{empty_symlinks} =
_mark_empty_symlinks($git_svn, $switch_path);
}
So for some reason new() thinks it's okay to leave $self->{c}
uninitialized, but delete_entry() and open_file() expect it to be set.
It does seem that the ls-tree $self->{c} usage in both of those routines
is from approximately the beginning of time. See these two, if you
compiled your git with log -L:
git log -L:delete_entry:git-svn.perl a6180325^
git log -L:open_file:git-svn.perl a6180325^
Unfortunately that's pretty much where my git-svn knowledge ends. Maybe
Eric can help?
--
Thomas Rast
trast@{inf,student}.ethz.ch
prev parent reply other threads:[~2013-03-16 14:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 22:17 git svn error "Not a valid object name" Adam Retter
2013-03-16 1:45 ` Eric Wong
2013-03-16 12:07 ` Adam Retter
2013-03-16 17:13 ` Eric Wong
2013-03-16 18:52 ` Dannes Wessels
2013-03-16 18:54 ` Adam Retter
2013-03-16 14:13 ` Thomas Rast [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y5dnv3es.fsf@pctrast.inf.ethz.ch \
--to=trast@student.ethz.ch \
--cc=adam@exist-db.org \
--cc=dannes@exist-db.org \
--cc=git@vger.kernel.org \
--cc=ljo@exist-db.org \
--cc=normalperson@yhbt.net \
--cc=wolfgang@exist-db.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).