Comment 6 for bug 290110

Revision history for this message
Grant Rettke (grettke) wrote : Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

I made the change here:

try:
            for project, bp, nick in layout.get_branches(revnum, pb=pb):
                branches.append(SvnBranch(self, bp, _skip_check=False))
        finally:
            pb.finished()
        return branches

And got this result:

C:\temp\t2>bzr svn-import file:///G:/Old-Svn-Repo imported-svn-repo
bzr: ERROR: bzrlib.errors.NoSuchRevision: SvnBranch('file:///G:/Old-Svn-Repo/stx
-object-getdef/trunk') has no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0
e7423ac54:stx-object-getdef%2Ftrunk:1190

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 893, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 839, in run_bzr
  File "bzrlib\commands.pyo", line 539, in run_argv_aliases
  File "bzrlib\commands.pyo", line 853, in ignore_pipe
  File "C:/Programs/Bazaar/plugins\svn\__init__.py", line 281, in run
  File "C:/Programs/Bazaar/plugins\svn\convert.py", line 239, in convert_reposit
ory
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1927, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1727, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 507, in update_revisions
  File "C:/Programs/Bazaar/plugins\svn\branch.py", line 299, in last_revision_in
fo
  File "C:/Programs/Bazaar/plugins\svn\branch.py", line 309, in revision_id_to_r
evno
NoSuchRevision: SvnBranch('file:///G:/Old-Svn-Repo/stx-object-getdef/trunk') has
 no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54:stx-object-getde
f%2Ftrunk:1190

bzr 1.9 on python 2.5.2 (win32)
arguments: ['bzr', 'svn-import', 'file:///G:/Old-Svn-Repo', 'imported-svn-repo']

encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programs\Bazaar\plugins\bzrtools [1.9.1]
  launchpad C:\Programs\Bazaar\plugins\launchpad [unknown]
  qbzr C:\Programs\Bazaar\plugins\qbzr [0.9.5]
  svn C:\Programs\Bazaar\plugins\svn [0.4.14]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

C:\temp\t2>runemacs C:\Programs\Bazaar\plugins\svn\repository.py