Re: importing bk into git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux