git/list[1] front-page[2] threads[3] people[4] search[5] about
 

importing bk into git

From
CChristoph <christoph.duelli@gmx.de>
Date
Nov 29, 2007, 21:32 UTC
Message-ID
<200711292232.03352.christoph.duelli@gmx.de>
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

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.

Any idea if/how I can fix this? Thanks for any ideas and best regards

Christoph (Sorry, my python and git skills are so far very limited.)

PS: I have attached the script I downloaded from the net.
-- 
FORTUNE'S PARTY TIPS		#14

Tired of finding that other people are helping themselves to your good
liquor at BYOB parties?  Take along a candle, which you insert and
light after you've opened the bottle.  No one ever expects anything
drinkable to be in a bottle which has a candle stuck in its neck.
Next: Andreas Ericsson
Message 1 of 6 in “importing bk into git”
  1. ChristophNov 29, 2007
  2. Andreas EricssonNov 30, 2007
  3. Replace the word 'update-cache' by 'update-index' everywhereJohannes Schindelin, Nov 30, 2007
  4. ChristophDec 8, 2007
  5. David KettlerDec 3, 2007
  6. ChristophDec 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.