"visualise" shows a revision which isn't in the branch

Bug #556347 reported by GuilhemBichot on 2010-04-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Vincent Ladeuil

Bug Description

I have a shared repo with many branches inside, one of them named mysql-next-mr-opt-backporting.
Revision <email address hidden> doesn't exist in that latter branch:

[mysql-next-mr-opt-backporting $] bzr --no-aliases --no-plugins log -n0 -r revid:<email address hidden>
bzr: ERROR: bzrlib.errors.NoSuchRevision: BzrBranch6('file:///home/mysql_src/bzrrepos/mysql-next-mr-opt-backporting/') has no revision <email address hidden>

[/m/bzrrepos/mysql-next-mr-opt-backporting $] bzr --no-aliases --no-plugins log -n0 | fgrep '<email address hidden>'
no rows.

Ok so far. But:
[/m/bzrrepos/mysql-next-mr-opt-backporting $] bzr --no-aliases viz -r revid:<email address hidden> --limit=1
does show the revision. That doesn't sound normal.

Could it be that it's searching for revisions inside the entire shared repository instead of inside the branch where the command is run?

using bzr.dev of today:
revid: <email address hidden>
and bzr-gtk of today:
revision-id:<email address hidden>

Related branches

GuilhemBichot (guilhem-bichot) wrote :

shared repo format is:
       control: Meta directory format 1
  working tree: Working tree format 6
        branch: Branch format 6
    repository: Packs 6 (uses btree indexes, requires bzr 1.9)

Martin Pool (mbp) wrote :

Yes, it does look inside the repository directly. Is this a problem or just a bit surprising?

We could check that the revision is in the history of the branch (which log is doing) but that would be a bit more work.

Changed in bzr-gtk:
importance: Undecided → Low
status: New → Incomplete
GuilhemBichot (guilhem-bichot) wrote :

Hello Martin, thanks for the answer. Given that "bzr log -rX" fails if X is not in the branch, and I saw "bzr viz" as just a graphical "bzr log", yes I find it surprising that it happily shows X which isn't in the branch. This is made even more confusing by the fact that the title of the "viz" GUI window is the branch's directory, which suggests to the innocent that X is in this branch.
Let's look at "bzr help viz":
  Opens a graphical window to allow you to see the history of the branch
  and relationships between revisions in a visual manner,

  The default starting point is latest revision on the branch, you can
  specify a starting point with -r revision.
It says "see the history of *the branch*", not "the shared repository".

If the current behaviour really has to stay, could you please make sure it's documented in "bzr help viz"? Thanks.

Martin Pool (mbp) on 2010-05-14
Changed in bzr-gtk:
status: Incomplete → Confirmed
Vincent Ladeuil (vila) wrote :

bzr viz can be used to visualize *several* branches at once so it already differs from 'bzr log'.

The help is not clear about this as the [LOCATIONS...] part is easily missed.

I'll clarify the help docstring.

Changed in bzr-gtk:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
GuilhemBichot (guilhem-bichot) wrote :

Hello, yes the help is not clear: it says

Purpose: Graphically visualise this branch.
Opens a graphical window to allow you to see the history of the branch
 The default starting point is latest revision on the branch

Which all suggest that this is about a branch, not several branches.
By the way, what happens when viewing several branches? what is the purpose?

Vincent Ladeuil (vila) wrote :

The help now says:
Purpose: Graphically visualise one or several branches.
Usage: bzr visualise [LOCATIONS...]


  Opens a graphical window to allow you to see branches history and
  relationships between revisions in a visual manner,

  If no revision is specified, the branch last revision is taken as a
  starting point. When a revision is specified, the presented graph starts
  with it (as a side effect, when a shared repository is used, any revision
  can be used even if it's not part of the branch history).

The purpose is to get a quick representation of the differences between two or more branches, is one merged into another, when did they diverge, etc.

Changed in bzr-gtk:
status: In Progress → Fix Committed
Gary van der Merwe (garyvdm) wrote :

Since we load the whole graph, it would be cheep to check if the specified revision is a ancestor of the branch tip. Would it be usefull for viz to do this?

Vincent Ladeuil (vila) wrote :

Well, it *is* a useful feature once you realized how it works, so at worst I would add a warning dialog with a check box 'I know, stop bothering me' to disable future warnings) ?

Jelmer Vernooij (jelmer) on 2011-02-18
Changed in bzr-gtk:
milestone: none → 0.100.0
Jelmer Vernooij (jelmer) on 2011-03-02
Changed in bzr-gtk:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers