git-remote-bzr fails with "RevisionNotPresent"

Bug #1906915 reported by Mantas Mikulėnas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
Confirmed
Medium
Unassigned

Bug Description

When trying to use the git-remote-bzr helper to download lp:ecryptfs in Git format, the process quickly fails with:

$ git clone bzr::bzr+ssh://bazaar.launchpad.net/+branch/ecryptfs/
Cloning into 'ecryptfs'...
Traceback (most recent call last):map 0/249
  File "/usr/lib/python3.9/site-packages/breezy/git/cache.py", line 905, in _get_entry
    return next(entries)[2]
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/breezy/git/object_store.py", line 640, in _lookup_revision_sha1
    return self._cache.idmap.lookup_commit(revid)
  File "/usr/lib/python3.9/site-packages/breezy/git/cache.py", line 923, in lookup_commit
    return self._get_entry((b"commit", revid, b"X"))[:40]
  File "/usr/lib/python3.9/site-packages/breezy/git/cache.py", line 908, in _get_entry
    raise KeyError
KeyError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/breezy/git/object_store.py", line 643, in _lookup_revision_sha1
    return mapping_registry.parse_revision_id(revid)[0]
  File "/usr/lib/python3.9/site-packages/breezy/git/mapping.py", line 529, in revision_id_bzr_to_foreign
    raise errors.InvalidRevisionId(bzr_revid, None)
breezy.errors.InvalidRevisionId: Invalid revision-id {<email address hidden>'} in None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/breezy/bzr/inventorytree.py", line 932, in iter_files_bytes
    for result in self._repository.iter_files_bytes(repo_desired_files):
  File "/usr/lib/python3.9/site-packages/breezy/bzr/remote.py", line 2347, in iter_files_bytes
    raise errors.RevisionNotPresent(revision_id=missing_key[1],
breezy.errors.RevisionNotPresent: Revision {b'git-v1:e5a1d5d9fb2bac724e45c7d9892a622697b52934'} not present in "b'doc/design__doc/img7.png'".

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/git-remote-bzr", line 52, in <module>
    helper.process(sys.stdin.buffer, sys.stdout.buffer)
  File "/usr/lib/python3.9/site-packages/breezy/git/git_remote_helper.py", line 172, in process
    self.process_line(line, outf)
  File "/usr/lib/python3.9/site-packages/breezy/git/git_remote_helper.py", line 190, in process_line
    self.commands[argv[0].decode()](self, outf, argv)
  File "/usr/lib/python3.9/site-packages/breezy/git/git_remote_helper.py", line 124, in cmd_list
    for ref, git_sha1 in viewitems(refs.as_dict()):
  File "/usr/lib/python3.9/site-packages/dulwich/refs.py", line 210, in as_dict
    ret[key] = self[(base + b'/' + key).strip(b'/')]
  File "/usr/lib/python3.9/site-packages/dulwich/refs.py", line 297, in __getitem__
    _, sha = self.follow(name)
  File "/usr/lib/python3.9/site-packages/dulwich/refs.py", line 269, in follow
    contents = self.read_ref(refname)
  File "/usr/lib/python3.9/site-packages/dulwich/refs.py", line 242, in read_ref
    contents = self.read_loose_ref(refname)
  File "/usr/lib/python3.9/site-packages/breezy/git/refs.py", line 156, in read_loose_ref
    return self.object_store._lookup_revision_sha1(revid)
  File "/usr/lib/python3.9/site-packages/breezy/git/object_store.py", line 645, in _lookup_revision_sha1
    self._update_sha_map(revid)
  File "/usr/lib/python3.9/site-packages/breezy/git/object_store.py", line 468, in _update_sha_map
    self._update_sha_map_revision(revid)
  File "/usr/lib/python3.9/site-packages/breezy/git/object_store.py", line 557, in _update_sha_map_revision
    for path, obj in self._revision_to_objects(
  File "/usr/lib/python3.9/site-packages/breezy/git/object_store.py", line 510, in _revision_to_objects
    for path, obj, bzr_key_data in _tree_to_objects(
  File "/usr/lib/python3.9/site-packages/breezy/git/object_store.py", line 311, in _tree_to_objects
    for (path, file_id), chunks in tree.iter_files_bytes(
  File "/usr/lib/python3.9/site-packages/breezy/bzr/inventorytree.py", line 935, in iter_files_bytes
    raise errors.NoSuchFile(e.file_id)
breezy.errors.NoSuchFile: No such file: b'doc/design__doc/img7.png'

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This looks like an issue dealing with underscores in file names. The actual file name is doc/design_doc/img7.png, but we're having trouble decoding the file id somehow.

Changed in brz:
status: New → Triaged
importance: Undecided → Medium
Gazaliy Alade (al42925)
Changed in brz:
status: Triaged → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.