bzr push --overwrite from a branch with good revnos does not fix up the target branches revnos

Bug #599492 reported by Rodolfo Carvalho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

URL: https://code.launchpad.net/~agilence/+junk/tonomundo

The `Recent revisions` shows revisions from 13 down to 4, and though the authorship of the last revision is correct, the link it points to is incorrect:

Current link: "http://bazaar.launchpad.net/~agilence/+junk/tonomundo/revision/13" - wrong revision (different commiter, etc)
Correct link: "http://bazaar.launchpad.net/~agilence/+junk/tonomundo/revision/192"

The same happens to other revisions. The numbering is wrong.

Curtis Hovey (sinzui)
affects: launchpad → launchpad-code
Revision history for this message
Tim Penhey (thumper) wrote :

I remember that this has happened before. I'm trying to remember what caused it though.

The numbering will be wrong because the database things that the last revision is 13, and by looking at:
    http://bazaar.launchpad.net/~agilence/+junk/tonomundo/.bzr/branch/last-revision
you can see that the branch thinks that the last revision is 13.

Now, how to fix it?

What version of bzr are you using client side?

Revision history for this message
Tim Penhey (thumper) wrote :

I talked with some people on #bzr (freenode irc) and the consensus is that the problem is most likely due to an old version of bzr. If you are using a recent version then I'll get them to chase more.

Now to fix it:

You should reconcile your local branch using `bzr reconcile`
Then push the branch to launchpad `bzr push --overwrite` will force the file to be updated. The --overwrite flag is only needed if there are no new revisions as well.

Hopefully this will work, and please let us know your bzr version.

Changed in launchpad-code:
status: New → Incomplete
Revision history for this message
Rodolfo Carvalho (rhcarvalho) wrote : Re: [Bug 599492] Re: Incorrect links to revisions

My local config:

$ bzr version
Bazaar (bzr) 2.2b2
  Python interpreter: /usr/bin/python 2.6.1
  Python standard library:
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
  Platform: Darwin-10.4.0-i386-64bit
...
(actually it's OS X 10.6.3)

I just joined the team and I don't know how they've been using Bzr to come
to this mess. Possibly someone else may have used older versions.

$ bzr reconcile
Reconciling branch file:///Users/rodolfo/projects/tonomundo/
Fixing last revision info 13 => 192
Reconciling repository file:///Users/rodolfo/projects/tonomundo/
Reconciliation complete.

Locally the file .bzr/branch/last-revision is fixed, however I doubt whether
the push was successful:

$ bzr push --overwrite
Using saved push location: bzr+ssh://
bazaar.launchpad.net/~agilence/%2Bjunk/tonomundo/
No new revisions to push.

Let's see if the version at launchpad will get fixed in the next few
minutes.

Thanks Tim!

[]'s

Rodolfo Carvalho

On Tue, Jun 29, 2010 at 02:41, Tim Penhey <email address hidden> wrote:

> I talked with some people on #bzr (freenode irc) and the consensus is
> that the problem is most likely due to an old version of bzr. If you
> are using a recent version then I'll get them to chase more.
>
> Now to fix it:
>
> You should reconcile your local branch using `bzr reconcile`
> Then push the branch to launchpad `bzr push --overwrite` will force the
> file to be updated. The --overwrite flag is only needed if there are no new
> revisions as well.
>
> Hopefully this will work, and please let us know your bzr version.
>
> ** Changed in: launchpad-code
> Status: New => Incomplete
>
> --
> Incorrect links to revisions
> https://bugs.launchpad.net/bugs/599492
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Launchpad Bazaar Integration: Incomplete
>
> Bug description:
> URL: https://code.launchpad.net/~agilence/+junk/tonomundo<https://code.launchpad.net/%7Eagilence/+junk/tonomundo>
>
> The `Recent revisions` shows revisions from 13 down to 4, and though the
> authorship of the last revision is correct, the link it points to is
> incorrect:
>
> Current link: "
> http://bazaar.launchpad.net/~agilence/+junk/tonomundo/revision/13<http://bazaar.launchpad.net/%7Eagilence/+junk/tonomundo/revision/13>"
> - wrong revision (different commiter, etc)
> Correct link: "
> http://bazaar.launchpad.net/~agilence/+junk/tonomundo/revision/192<http://bazaar.launchpad.net/%7Eagilence/+junk/tonomundo/revision/192>
> "
>
> The same happens to other revisions. The numbering is wrong.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/launchpad-code/+bug/599492/+subscribe
>

Revision history for this message
Aaron Bentley (abentley) wrote :

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

On 06/28/2010 09:41 PM, Tim Penhey wrote:
> I talked with some people on #bzr (freenode irc) and the consensus is
> that the problem is most likely due to an old version of bzr.

I think it's possible that it was cause by someone trying to do a merge
as their initial commit, e.g.:

$ bzr init foo
Created a standalone tree (format: 2a)

abentley@lumpy:~/sandbox$ cd foo
abentley@lumpy:~/sandbox/foo$ bzr merge ~/hitchhiker/
Doing on-the-fly conversion from RepositoryFormatKnitPack4() to
RepositoryFormat2a().
This may take some time. Upgrade the repositories to the same format for
better performance.
+N COPYING.txt

+N README.txt
+N hitchhiker
+N setup.py
All changes applied successfully.

abentley@lumpy:~/sandbox/foo$ bzr commit -m "blah"
Committing to: /home/abentley/sandbox/foo/

deleted
modified COPYING.txt
modified README.txt
modified hitchhiker
modified setup.py

You need a passphrase to unlock the secret key for
user: "Aaron Bentley <email address hidden>"
1024-bit DSA key, ID 5616A88D, created 2004-12-08

Committed revision 1.

abentley@lumpy:~/sandbox/foo$ bzr log
    1 Aaron Bentley 2010-06-29
      blah

    0 Aaron Bentley 2009-11-12 [merge]
      Merge setup.py from Martin Pool

   -1 Aaron Bentley 2009-11-06
      Handle permission denied for mkdir.

   -2 Aaron Bentley 2009-07-08
      Fix lsl with specified path.

   -3 Aaron Bentley 2009-07-08
      Use default logging to show true errors.

   -4 Paul Hummer 2009-06-22
      Fixed typo

   -5 Aaron Bentley 2008-11-13
      Implement rename command

   -6 Aaron Bentley 2008-11-11
      Handle bad URLs better

   -7 Aaron Bentley 2008-11-11
      Implement ls -l functionality

   -8 Aaron Bentley 2008-11-07
      Implement mirror on Transport.copy_tree_to_transport

Use --include-merges or -n0 to see merged revisions.
abentley@lumpy:~/sandbox/foo$ bzr --version
Bazaar (bzr) 2.2b3
  from bzr checkout /home/abentley/bzr/bzr.dev
    revision: 5321
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: /usr/bin/python 2.6.5
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.32-22-generic-x86_64-with-Ubuntu-10.04-lucid
  bzrlib: /home/abentley/bzr/bzr.dev/bzrlib
  Bazaar configuration: /home/abentley/.bazaar
  Bazaar log file: /home/abentley/.bzr.log

Copyright 2005-2010 Canonical Ltd.
http://bazaar.canonical.com/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Bazaar is part of the GNU Project to produce a free operating system.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwp+UYACgkQ0F+nu1YWqI0fuwCeM3sOcNHTtV3+cGwl3vWVsq7o
paoAn233T8eeefBttoDWTlpKRy+mh+kw
=RzBJ
-----END PGP SIGNATURE-----

Revision history for this message
Robert Collins (lifeless) wrote : Re: Incorrect links to revisions

The root cause is in bzr. We need to make sure that you can't setup a branch like this; I think init+merge+commit might be how people are doing it. We also need a way to fix it, and I'm going to make this bug be about that: reconcile is too heavyweight to want to do in many branches, push --overwrite from a fixed branch should work.

affects: launchpad-code → bzr
Changed in bzr:
importance: Undecided → Medium
status: Incomplete → Confirmed
summary: - Incorrect links to revisions
+ bzr push --overwrite from a branch with good revnos does not fix up the
+ target branches revnos
Revision history for this message
Rodolfo Carvalho (rhcarvalho) wrote : Re: [Bug 599492] Re: Incorrect links to revisions

Just a follow-up, after pushing new revisions into the repository from my
correct branch (corrected with bzr reconcile) the "problem" was fixed and
Launchpad is showing the right revision numbers/ links.

"bzr reconcile; bzr push --overwrite" did not work, though.

Rodolfo Carvalho

On Wed, Jun 30, 2010 at 04:22, Robert Collins <email address hidden>wrote:

> The root cause is in bzr. We need to make sure that you can't setup a
> branch like this; I think init+merge+commit might be how people are
> doing it. We also need a way to fix it, and I'm going to make this bug
> be about that: reconcile is too heavyweight to want to do in many
> branches, push --overwrite from a fixed branch should work.
>
> ** Project changed: launchpad-code => bzr
>
> ** Changed in: bzr
> Importance: Undecided => Medium
>
> ** Changed in: bzr
> Status: Incomplete => Confirmed
>
> ** Summary changed:
>
> - Incorrect links to revisions
> + bzr push --overwrite from a branch with good revnos does not fix up the
> target branches revnos
>
> --
> bzr push --overwrite from a branch with good revnos does not fix up the
> target branches revnos
> https://bugs.launchpad.net/bugs/599492
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Bazaar Version Control System: Confirmed
>
> Bug description:
> URL: https://code.launchpad.net/~agilence/+junk/tonomundo<https://code.launchpad.net/%7Eagilence/+junk/tonomundo>
>
> The `Recent revisions` shows revisions from 13 down to 4, and though the
> authorship of the last revision is correct, the link it points to is
> incorrect:
>
> Current link: "
> http://bazaar.launchpad.net/~agilence/+junk/tonomundo/revision/13<http://bazaar.launchpad.net/%7Eagilence/+junk/tonomundo/revision/13>"
> - wrong revision (different commiter, etc)
> Correct link: "
> http://bazaar.launchpad.net/~agilence/+junk/tonomundo/revision/192<http://bazaar.launchpad.net/%7Eagilence/+junk/tonomundo/revision/192>
> "
>
> The same happens to other revisions. The numbering is wrong.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/bzr/+bug/599492/+subscribe
>

Jelmer Vernooij (jelmer)
tags: added: push reconcile
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.