rebasing branches with only one revision fails

Bug #144401 reported by Pieter Nagel
2
Affects Status Importance Assigned to Milestone
bzr-rewrite
Fix Released
Medium
Jelmer Vernooij

Bug Description

When running the attached script, I would expect a message like "ERROR: already rebased on ...". Instead, it throws a NoSuchRevision error. There seems to be an algorithm that assumes it can refer to "revision 2", but the branch in question does not have one.

Build phase: .....
added file.txt
Collecting changes [Directory 0] - Stage: .
Collecting changes [Directory 1] - Stage: .
added file.txt
Saving data locally - Stage: .
Updating the working tree - Stage: .
Committed revision 1.
Running post commit hooks - Stage: .
Fetch phase: .............
Build phase: ........
Branched 1 revision(s).
Collecting changes [Directory 0] - Stage: .
Collecting changes [Directory 1] - Stage: .
modified file.txt
Saving data locally - Stage: .
Updating the working tree - Stage: .
Committed revision 2.
Running post commit hooks - Stage: .
Rebasing on file:///home/pieter/tmp/rebase-test/repo/
Fetch phase: .............
Fetch phase: .
bzr: ERROR: bzrlib.errors.NoSuchRevision: Branch BzrBranch5('file:///home/pieter/tmp/rebase-test/branch/') has no revision 2

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 817, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 779, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 477, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 789, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/pieter/.bazaar/plugins/rebase/__init__.py", line 140, in run
    wt.branch.revision_id_to_revno(common_revid)+1)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 531, in get_rev_id
    raise errors.NoSuchRevision(self, revno)
NoSuchRevision: Branch BzrBranch5('file:///home/pieter/tmp/rebase-test/branch/') has no revision 2

bzr 0.90.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'rebase']

** please send this report to <email address hidden>

Revision history for this message
Pieter Nagel (pieter-equinox) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 144401] rebasing branches with only one revision fails

Am Montag, den 24.09.2007, 11:08 +0000 schrieb Pieter Nagel:
> Public bug reported:
>
> When running the attached script, I would expect a message like
> "ERROR:
> already rebased on ...". Instead, it throws a NoSuchRevision error.
> There seems to be an algorithm that assumes it can refer to "revision
> 2", but the branch in question does not have one.
What version/revision of bzr-rebase are you using?
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Pieter Nagel (pieter-equinox) wrote :

I am using the trunk at http://people.samba.org/bzr/jelmer/bzr-rebase/trunk/, up-to-date up to revno 46.

Jelmer Vernooij (jelmer)
Changed in bzr-rebase:
assignee: nobody → jelmer
importance: Undecided → Medium
milestone: none → 0.2
status: New → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-rebase:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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