git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: christoph.duelli@gmx.de
Cc: git@vger.kernel.org
Subject: Re: importing bk into git
Date: Fri, 30 Nov 2007 08:59:01 +0100	[thread overview]
Message-ID: <474FC2C5.8060400@op5.se> (raw)
In-Reply-To: <200711292232.03352.christoph.duelli@gmx.de>

Christoph wrote:
> I am trying to import a BitKeeper repo into a (new) git repo.
> 
> I am trying with the script bk2git.py that I found on the web.
> This does not quite work - I fear script is no longer working with the current 
> git release. (I am using the current git release.)
> 
> If I have understood the script correctly, it does repeated bk checkouts and 
> imports the updates the git repo diff of the (next) checkout etc.
> 
> It seems this script tries to do so by settings environment vars
> GIT_OBJECT_DIRECTORY and GIT_INDEX_FILE
> to point at the git repo.
> 
> The bk checkout are done at a temp. dir (tmp_dir).
> 
> 
> The following lines fail
>   os.system("cd %s; git-ls-files --deleted | xargs 
> git-update-cache --remove" % tmp_dir)
> 
> with: fatal: Not a git repository
> xargs: git-update-cache: No such file or directory
> 

You may have better luck using "git update-index" instead of
git-update-cache. If that doesn't work, try finding out which
version of git the importer script was written against and try
using that version of git for the import.

If you run into problems while using a newer git on the
imported repository that'll be a different discussion.

> The problem seems to be that the script cd's into the temp dir (which is not a 
> git repo) and the git-ls-files fails to find a git repo there.
> I think the issue might be that an earlier version of git was perhaps able to 
> find the repo by means of the env. vars mentioned above.
> 

It should still do this, afaik, although it's probably better
to just use GIT_DIR nowadays.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2007-11-30  7:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29 21:32 importing bk into git Christoph
2007-11-30  7:59 ` Andreas Ericsson [this message]
2007-11-30 11:35   ` [PATCH] Replace the word 'update-cache' by 'update-index' everywhere Johannes Schindelin
2007-12-08 19:19   ` importing bk into git (succeeded) Christoph
2007-12-03  3:02 ` importing bk into git David Kettler
2007-12-03 20:59   ` Christoph

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=474FC2C5.8060400@op5.se \
    --to=ae@op5.se \
    --cc=christoph.duelli@gmx.de \
    --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).