Git import aborted with bzrlib.errors.InvalidEntryName

Asked by Ronald Blaschke

I was trying to mirror a Git branch to lp:~rblasch/antlr/trunk, but received:

2010-08-03 18:44:51 INFO Starting job.
2010-08-03 18:44:51 INFO Getting exising bzr branch from central store.
2010-08-03 18:44:51 INFO 53 bytes transferred |
2010-08-03 18:44:51 INFO Importing foreign branch.
2010-08-03 18:44:52 INFO Counting objects: 32173, done. 0
2010-08-03 18:45:09 INFO finding revisions to fetch:generating index 0/32173
2010-08-03 18:45:14 INFO finding revisions to fetch 1/6381
2010-08-03 18:45:28 INFO
Traceback (most recent call last):
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/scripts/code-import-worker.py", line 82, in <module>
    sys.exit(script.main())
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/scripts/code-import-worker.py", line 77, in main
    return import_worker.run()
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/lib/lp/codehosting/codeimport/worker.py", line 437, in run
    return self._doImport()
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/lib/lp/codehosting/codeimport/worker.py", line 575, in _doImport
    overwrite=True, **self.getExtraPullArgs())
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/branch.py", line 510, in pull
    stop_revision, overwrite=overwrite, graph=graph, limit=limit)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/branch.py", line 459, in _update_revisions
    determine_wants, self.source.mapping, limit=limit)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 540, in fetch_objects
    objects_iter, store, recorded_wants, pb, limit)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 431, in import_git_objects
    target_git_object_retriever, trees_cache)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 348, in import_git_commit
    allow_submodules=getattr(repo._format, "supports_tree_reference", False))
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 259, in import_git_tree
    allow_submodules=allow_submodules)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 259, in import_git_tree
    allow_submodules=allow_submodules)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 259, in import_git_tree
    allow_submodules=allow_submodules)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 271, in import_git_tree
    (child_base_mode, child_mode), store_updater, lookup_file_id)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9518/optionalbzrplugins/git/fetch.py", line 108, in import_git_blob
    ie = cls(file_id, name.decode("utf-8"), parent_id)
  File "/home/pqm/for_rollouts/production/eggs/bzr-2.1.0-py2.5-linux-x86_64.egg/bzrlib/inventory.py", line 537, in __init__
  File "/home/pqm/for_rollouts/production/eggs/bzr-2.1.0-py2.5-linux-x86_64.egg/bzrlib/inventory.py", line 216, in __init__
bzrlib.errors.InvalidEntryName: Invalid entry name: tests\h
Import failed:
Traceback (most recent call last):
Failure: twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended with exit code 1.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Jelmer Vernooij
Solved:
Last query:
Last reply:
Revision history for this message
Jelmer Vernooij (jelmer) said :
#1

This is because the antlr repository contains a file named "tests\h", and bzr does not support a backslash in filenames.

Revision history for this message
Ronald Blaschke (rblasch) said :
#2

Thanks, Jelmer. Interestingly, Git clones the branch without any message or complaint. Also, I think the file may be a directory.

Revision history for this message
Ronald Blaschke (rblasch) said :
#3

... I meant the 'tests' part.

Revision history for this message
Best Jelmer Vernooij (jelmer) said :
#4

On Tue, 2010-08-03 at 19:24 +0000, Ronald Blaschke wrote:
> Question #119877 on Launchpad Bazaar Integration changed:
> https://answers.launchpad.net/launchpad-code/+question/119877
>
> Ronald Blaschke posted a new comment:
> Thanks, Jelmer. Interestingly, Git clones the branch without any
> message or complaint. Also, I think the file may be a directory.
Yes, Git basically treats paths as bytestrings and uses '/' as the path
separator, even on windows.

Revision history for this message
Ronald Blaschke (rblasch) said :
#5

Thanks Jelmer Vernooij, that solved my question.

Revision history for this message
Jelmer Vernooij (jelmer) said :
#6

See also the bug I've linked to this question. We plan on allowing backslashes but warning the user.