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

Bug #556347 reported by GuilhemBichot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Fix Released
Low
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>

Tags: mysql

Related branches

Revision history for this message
GuilhemBichot (guilhem-bichot) wrote :

shared repo format is:
Format:
       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)

Revision history for this message
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
Revision history for this message
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)
Changed in bzr-gtk:
status: Incomplete → Confirmed
Revision history for this message
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
Revision history for this message
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?

Revision history for this message
Vincent Ladeuil (vila) wrote :

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

...

Description:
  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
Revision history for this message
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?

Revision history for this message
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)
Changed in bzr-gtk:
milestone: none → 0.100.0
Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
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.