a breaking instance of bzr push

Bug #91641 reported by Michael Hudson-Doyle
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

This seems much simpler than the other similar bugs. I checked out pydoctor using

bzr get http://codespeak.net/svn/user/mwh/pydoctor/trunk pydoctor-bzr-2

I made a trivial change (deleted an item in doc/todo.txt), did 'bzr ci' and then 'bzr push http://codespeak.net/svn/user/mwh/pydoctor/trunk'.

This was the result:

$ bzr push http://codespeak.net/svn/user/mwh/pydoctor/trunk
This transport does not update the working tree of: http://codespeak.net/svn/user/mwh/pydoctor/trunk
bzr: ERROR: exceptions.KeyError: u'bin/makedocsys'

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/commands.py", line 650, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/commands.py", line 612, in run_bzr
    ret = run(*run_argv)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/commands.py", line 304, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/builtins.py", line 795, in run
    push_result = br_from.push(br_to, overwrite)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/branch.py", line 1661, in push
    stop_revision, _hook_master=master_branch)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/bzrlib/branch.py", line 1520, in push
    target.update_revisions(self, stop_revision)
  File "/Users/mwh/.bazaar/plugins/bzrsvn/branch.py", line 219, in update_revisions
    push_as_merged(self, other, rev_id)
  File "/Users/mwh/.bazaar/plugins/bzrsvn/commit.py", line 381, in push_as_merged
    new_tree = target.repository.revision_tree(target.last_revision())
  File "/Users/mwh/.bazaar/plugins/bzrsvn/repository.py", line 308, in revision_tree
    return SvnRevisionTree(self, revision_id, inventory)
  File "/Users/mwh/.bazaar/plugins/bzrsvn/tree.py", line 60, in __init__
    self.id_map = repository.get_fileid_map(self.revnum, self.branch_path)
  File "/Users/mwh/.bazaar/plugins/bzrsvn/repository.py", line 234, in get_fileid_map
    self.revision_fileid_renames)
  File "/Users/mwh/.bazaar/plugins/bzrsvn/fileids.py", line 197, in get_map
    revmap[p] = map[p][0]
KeyError: u'bin/makedocsys'

bzr 0.15.0candidate0 on python 2.4.1.final.0 (darwin)
arguments: ['/Library/Frameworks/Python.framework/Versions/Current/bin/bzr', 'push', 'http://codespeak.net/svn/user/mwh/pydoctor/trunk']

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

Thanks,
mwh

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → jelmer
status: Unconfirmed → Confirmed
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I dug a little into this and found that it seems to be something to do with the history of the repository. The call to follow_branch_history in FileIdMap.get_map() doesn't seem to be returning enough of the history, and that's probably because the history of the repo looks a little like this:

/user/mwh/docextractor was created
/user/mwh/docextractor was svn mv-ed to /user/mwh/pydoctor
the contents of /user/mwh/pydoctor were svn mv-ed to /user/mwh/pydoctor/trunk

follow_branch_history doesn't seem to be following the mv from docextractor to pydoctor.

I don't really see why the ancient history of the repo is relevant, but that's probably just my limited understanding :-)

Of course, you've probably figured out this much already...

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 91641] Re: a breaking instance of bzr push

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 15 Mar 2007 10:36:48 -0000
Michael Hudson <email address hidden> wrote:

> I dug a little into this and found that it seems to be something to do
> with the history of the repository. The call to follow_branch_history
> in FileIdMap.get_map() doesn't seem to be returning enough of the
> history, and that's probably because the history of the repo looks a
> little like this:
>
> /user/mwh/docextractor was created
> /user/mwh/docextractor was svn mv-ed to /user/mwh/pydoctor
> the contents of /user/mwh/pydoctor were svn mv-ed
> to /user/mwh/pydoctor/trunk
>
> follow_branch_history doesn't seem to be following the mv from
> docextractor to pydoctor.
>
> I don't really see why the ancient history of the repo is relevant,
> but that's probably just my limited understanding :-)
Thanks, that helps. The history is needed so we can always use the same
file id for each file.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQCVAwUBRf/P4Qy0JeEGD2blAQIdVQP/eube24GUMzMYVCXb+AbFTMG9r+r0G5hP
yE7qC5drhHFW2A3WSo42gk9aSqkIwzcG+khndIgtXZCWowOKy+cA4/3E7XsboNtn
hiy0tmDbc8VVwe+DibeQNpwBGktkwGINsiN8JzWGg+/PC1RgTC2dmFZm44W4QHlt
oIe2dqM39wk=
=L+3o
-----END PGP SIGNATURE-----

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Undecided → Medium
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I added a failing test in https://code.launchpad.net/~micahel/bzr-svn/devel

Hope it helps :)

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Hudson wrote:
> I added a failing test in https://code.launchpad.net/~micahel/bzr-
> svn/devel
>
> Hope it helps :)
I think this has been fixed in the upstream 0.3 branch. I could
reproduce your bug with Bazaar 0.15 and your branch, but once I merged
it into the current 0.3 branch it suddenly went away, presumably because
of a performance improvement to commit I made recently.

Can you confirm that this bug has been fixed in the current 0.3 branch
(http://people.samba.org/bzr/jelmer/bzr-svn/0.3) ?

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRhhFcwy0JeEGD2blAQIzCQP/VttUr0ItJOwAo0ajXWkmgd/RfWuolwyF
bZEOo5OKit7pi7402ugI2jTIqxugg6MnUj9oSq6FGkvzTyjIZ2H9sBi2GHSYdpii
FGKofIsoXsYmKIdVFntEXVDSV94C5G0Wo7n20iKXFnFLljjeZumOvWX3pzpOqdSH
xMWixBlALQU=
=uhx6
-----END PGP SIGNATURE-----

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Grr! The test case passes with current 0.3, but my original command line still fails in the same way :(

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

However, if I trash my working copies and rebranch, it works. Thanks :)

All a bit mysterious though....

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

The status should be "Fix Committed" until 0.4 is out, right?

Changed in bzr-svn:
status: Confirmed → Fix Committed
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Hudson wrote:
> The status should be "Fix Committed" until 0.4 is out, right?
Yep, exactly. That might be 0.3.3 though.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRhl3MQy0JeEGD2blAQJZgQP9G+08SbW/dr6LWcgTSXsxyCa6sJbGXcsp
MH+ydLzzE/xSbtEKrNuT9tr5r/21WLr3JEuZp5dIndKz08Q4OFMJgxlsNhwA+71T
PM3v2zzlwzvFzX19p2LOk1CIas5dJdWX/ixATHtyIV8K4csoBUDbxrfVhH39jbGz
9fCqvFjDxxg=
=Lj/T
-----END PGP SIGNATURE-----

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
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

Remote bug watches

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