git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Morgan Christiansson <git@mog.se>
To: git@vger.kernel.org
Subject: Re: git-svn: File was not found in commit
Date: Mon, 12 Jan 2009 01:04:28 +0100	[thread overview]
Message-ID: <496A890C.8080208@mog.se> (raw)
In-Reply-To: <20090111215526.GA15533@atjola.homenet>

Björn Steinbrink wrote:
> On 2009.01.09 18:19:01 +0100, Morgan Christiansson wrote:
>   
>> ------------------------------------------------------------------------
>> r10577 | morgan | 2008-11-28 18:31:00 +0000 (Fri, 28 Nov 2008) | 3 lines
>> Changed paths:
>>   A /branches/rails/rails/vendor/plugins/acts_as_xapian/.git/FETCH_HEAD
>>   M /branches/rails/rails/vendor/plugins/acts_as_xapian/.git/config
>>   M /branches/rails/rails/vendor/plugins/acts_as_xapian/.git/index
>>   M /branches/rails/rails/vendor/plugins/acts_as_xapian/.git/logs/HEAD
>>   M /branches/rails/rails/vendor/plugins/acts_as_xapian/.git/logs/refs/heads/master 
>> # -- THIS FILE --
>>     
> Unless I totally misread that line, SVN reports that the file was
> _modified_, not added. For the file to be modified, it seems reasonable
> to expect that it existed in the previous commit.
>
> Is there anything "special" about how that file came into existence in
> that branch? Without further knowledge, that looks like a svn bug, but
> hey, it's svn, it might do funny stuff on purpose ;-)
>
> Maybe you could provide a small test case/repo?
>
> Björn
>   
Something odd happened when "git svn fetch" was adding r10559 to git:

        A       rails/vendor/plugins/acts_as_xapian/README.txt
        A       rails/vendor/plugins/acts_as_xapian/.cvsignore
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/refs/heads/master
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/refs/remotes/origin/HEAD
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/refs/remotes/origin/master
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/HEAD
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/description
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/update
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/post-receive
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/post-update
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/pre-rebase
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/hooks/prepare-commit-msg
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/applypatch-msg
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/pre-applypatch
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/post-commit
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/commit-msg
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/hooks/pre-commit
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/logs/refs/heads/master
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/logs/refs/remotes/origin/HEAD
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/logs/refs/remotes/origin/master
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/logs/HEAD
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/config
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/index
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/objects/pack/pack-570449ffe8ce399eca81f286cf942e51ace03448.pack
Ignoring path 
rails/vendor/plugins/acts_as_xapian/.git/objects/pack/pack-570449ffe8ce399eca81f286cf942e51ace03448.idx
Ignoring path rails/vendor/plugins/acts_as_xapian/.git/info/exclude
W: +empty_dir: 
branches/rails/rails/vendor/plugins/acts_as_xapian/.git/branches
W: +empty_dir: 
branches/rails/rails/vendor/plugins/acts_as_xapian/.git/objects/info
W: +empty_dir: 
branches/rails/rails/vendor/plugins/acts_as_xapian/.git/refs/tags
r10559 = 4f33ee36a5d933a62081a76c7788fb46a9e6f0e8 (rails)


The "Ignoring path" message appears to be coming from git which is 
refusing to commit the .git directory. Which leads to git-svn being 
unaware of the files being ignored and giving an error when it can't 
find them.


#The following commands will create a repository that has this problem:
cd ~
rm -rf gittest*
svnadmin create gittest-repo
svn co file:///$HOME/gittest-repo gittest-checkout
cd gittest-checkout
mkdir -p .git
touch .git/file
svn add .git
svn commit -m "Create .git/file"
echo 1 > .git/file
svn commit -m "Modify .git/file"

# The following will try to import the repository, which fails.
cd ~
mkdir gittest
cd gittest
git svn init file:///$HOME/gittest-repo
git svn fetch

# Output:
$ git svn fetch
    A    .git/file
Ignoring path .git/file
r1 = ccc56451d54315bd253b65c514351e996fbe880e (git-svn)
.git/file was not found in commit 
ccc56451d54315bd253b65c514351e996fbe880e (r1)


# Cleanup
rm -rf gittest gittest-repo gittest-checkout



I'm personally fine with these files being ignored by git, but git-svn 
needs to be aware that they are not added to the repository.

  reply	other threads:[~2009-01-12  0:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09 17:19 git-svn: File was not found in commit Morgan Christiansson
2009-01-11 18:36 ` Morgan Christiansson
2009-01-11 21:55 ` Björn Steinbrink
2009-01-12  0:04   ` Morgan Christiansson [this message]
2009-01-12  2:32     ` Eric Wong
2009-01-12  5:14       ` Eric Wong
2009-01-12 13:45         ` Morgan Christiansson
2009-01-19  2:41           ` Eric Wong

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=496A890C.8080208@mog.se \
    --to=git@mog.se \
    --cc=git@vger.kernel.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).