Confusing message in bottom panel when parent has changes

Bug #956268 reported by Alex Lewis on 2012-03-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Medium
Alexander Belchenko

Bug Description

Ubuntu - 11.04
Bazaar - 2.5.0 (from archive PPA)
Bazaar Explorer - 1.2.2

Setup:
  * I have a branch called feature-x which is a branch of trunk.
  * Some changes have been made to trunk and not yet merged into feature-x.
  * Open branch in Bazaar Explorer.
  * The top panel shows some modifications to the working tree of the branch.
  * The bottom panel shows modifications present on trunk.
  * The message in the bottom panel reads...

 "Branch has changes not present in its parent branch".

Shouldn't this message be something more like "Parent Branch has changes not yet present in this branch"?

Please accept my apologies if I have misunderstood something.

Related branches

Alex Lewis пишет:
> "Branch has changes not present in its parent branch".
>
> Shouldn't this message be something more like "Parent Branch has changes
> not yet present in this branch"?
>
> Please accept my apologies if I have misunderstood something.

Maybe the message is not clear enough, but it's correct. Your branch
feature-X has new revisions that don't present in trunk branch. So you
have changes not present in trunk, i.e. in the parent branch. This
bottom pane allows you to see diff of changes that don't merged yet to
trunk.

--
All the dude wanted was his rug back

Sorry, the message is fine if that is what the panel is for. I was confused as it looks like the contents of that panel (I.e. the files, changes, etc.) doesn't actually reflect what is on the branch compared to it's parent.

Please feel free to close this issue and I'll try to work out whether the contents is of the box is correct or whether something else is wrong. If I find anything wrong I'll raise a bug for that.

Apologies for wasting your time with this issue.

Cheers,
Alex

Alexander Belchenko (bialix) wrote :

This pane allows you to see diff as if you're using the following command:

bzr diff -r submit:

Changed in bzr-explorer:
status: New → Opinion

Thanks. I tried the command and the panel shows a file deleted but the "bzr diff -r submit:" doesn't show that change (amongst other changes that are consistent between the output and the panel).

I'll see if I can recreate the problem and raise a bug if there is a problem. Probably me just doing something wrong.

Thanks for your help!

Alex Lewis пишет:
> Thanks. I tried the command and the panel shows a file deleted but the
> "bzr diff -r submit:" doesn't show that change (amongst other changes
> that are consistent between the output and the panel).
>
> I'll see if I can recreate the problem and raise a bug if there is a
> problem. Probably me just doing something wrong.
>
> Thanks for your help!

Please file a bug if you find one. Reproduction steps would be very useful.

--
All the dude wanted was his rug back

Ah now I get it!!... (I think)

Ok so...
parent = trunk
branch = feature-x

If a file has been added to trunk after feature-x was created the bottom panel (whilst viewing feature-x) shows that as a file deleted, because feature-x does not have that file. Once trunk is merged into feature-x to "synchronise" them feature-x shows only the changes actually made on the feature-x branch.

Is that right?

If my understanding is now correct that IMO is a little confusing but that could be just be my lack of experience and one of the complexities of DVCS. If there was a way to display changes you actually made on a branch compared to implied changes because of the divergence from the parent then that might help avoid the confusion.

Ok here's the steps to reproduce a setup which caused my confusion...

...in new empty directory "bzr"...
bzr init-repo .
bzr init trunk
cd trunk
touch file1.txt
touch file2.txt
bzr add
bzr commit -m "Initial commit"
cd ..
mkdir branches
bzr branch trunk/ branches/feature-x
cd trunk
bzr remove file1.txt
bzr commit -m "Removing file1"
cd ../branches/feature-x
vi file2.txt (Make a change to the file, add some text)
bzr commit -m "Added some text"
cd ../../
bzr explorer .
-- Open the "branches/feature-x" folder.
-- The bottom panel now shows "file1.txt" as "Added" and file2.txt as "Modified". Personally I would have expected only to see file2.txt as modified but I can now see why the other file is listed there.
-- Exit Bazaar Explorer
cd trunk
bzr merge ../branches/feature-x
-- The output says only about the modification to file2.txt and does nothing with file1.txt.

So in my opinion the output in the bottom panel made me think that file1.txt would have reappeared in trunk when doing a merge (merging feature-x into trunk I mean). Bazaar actually behaved as I initially expected and just showed the change to file2.txt and did nothing with file1.txt.

So is this a bug in Bazaar Explorer, just a different approach taken by Explorer compared to Bazaar or just my own confusion? Please feel free to pick the last option :)

Hopefully I've been clear and made sense, apologies if not.

Alexander Belchenko (bialix) wrote :

Alex Lewis пишет:
> Ah now I get it!!... (I think)
>
> Ok so...
> parent = trunk
> branch = feature-x
>
> If a file has been added to trunk after feature-x was created the bottom
> panel (whilst viewing feature-x) shows that as a file deleted, because
> feature-x does not have that file. Once trunk is merged into feature-x
> to "synchronise" them feature-x shows only the changes actually made on
> the feature-x branch.
>
> Is that right?

It sounds about to be right. At least from the point of differences
between branches.

I'm sorry Alex, it seems I've misinformed you. In the case of the list
of changes against parent it will use different equivalent CLI

bzr diff -rancestor::trunk..-1

So basically it does diff between branches.

My initial suggestion about

bzr diff -r submit:

will work only if you have already merged some branch to your current
branch.

> If my understanding is now correct that IMO is a little confusing but
> that could be just be my lack of experience and one of the complexities
> of DVCS. If there was a way to display changes you actually made on a
> branch compared to implied changes because of the divergence from the
> parent then that might help avoid the confusion.

--
All the dude wanted was his rug back

Alexander Belchenko (bialix) wrote :

Alex Lewis пишет:
> Ok here's the steps to reproduce a setup which caused my confusion...

I can reproduce it with command-line instead of explorer:

C:\Temp\4>bzr init trunk
Created a standalone tree (format: 1.14)
C:\Temp\4\trunk>echo > foo.txt
C:\Temp\4\trunk>echo > bar.txt
C:\Temp\4\trunk>bzr add
adding bar.txt
adding foo.txt
C:\Temp\4\trunk>bzr ci -m Initial
Committing to: C:/Temp/4/trunk/
added bar.txt
added foo.txt
Committed revision 1.
C:\Temp\4>bzr branch trunk feature
Branched 1 revision.
C:\Temp\4\feature>echo >> foo.txt
C:\Temp\4\feature>bzr st
modified:
   foo.txt
C:\Temp\4\feature>bzr ci -m Modify
Committing to: C:/Temp/4/feature/
modified foo.txt
Committed revision 2.
C:\Temp\4\trunk>bzr rm bar.txt
deleted bar.txt
C:\Temp\4\trunk>bzr ci -m Remove
Committing to: C:/Temp/4/trunk/
deleted bar.txt
Committed revision 2.

C:\Temp\4\feature>bzr st -r branch:../trunk
added:
   bar.txt
modified:
   foo.txt

But if we do

C:\Temp\4\feature>bzr st -rancestor::parent..-1
modified:
   foo.txt

Obviously bzr-explorer uses the first variant of getting status report,
but it should use the second one to get the correct result.

> So in my opinion the output in the bottom panel made me think that
> file1.txt would have reappeared in trunk when doing a merge (merging
> feature-x into trunk I mean). Bazaar actually behaved as I initially
> expected and just showed the change to file2.txt and did nothing with
> file1.txt.
>
> So is this a bug in Bazaar Explorer, just a different approach taken by
> Explorer compared to Bazaar or just my own confusion? Please feel free
> to pick the last option :)

It looks like there is bug in bzr-explorer regarding showing changes
against parent.

--
All the dude wanted was his rug back

Changed in bzr-explorer:
status: Opinion → Confirmed
importance: Undecided → Medium
Alexander Belchenko (bialix) wrote :

We should fix the code in explorer/lib/status_data.py, function get_parent_submission_info. old_branch should be equivalent of -r ancestor::parent, right now it's equivalent of -r branch::parent.

Oh good glad this actually helped in the end :)

Changed in bzr-explorer:
assignee: nobody → Alexander Belchenko (bialix)
status: Confirmed → In Progress
milestone: none → 1.2.3
Changed in bzr-explorer:
status: In Progress → Fix Released
Alexander Belchenko (bialix) wrote :

Fix available in both lp:bzr-explorer and lp:bzr-explorer/1.2 branches and will be included in the next releases. You can already test it, get it from the corresponding branch. Thank you for your bug report and patience in explaining it.

Good news, cheers!

Thank you to you and the team.

On 30 March 2012 09:03, Alexander Belchenko <email address hidden> wrote:

> Fix available in both lp:bzr-explorer and lp:bzr-explorer/1.2 branches
> and will be included in the next releases. You can already test it, get
> it from the corresponding branch. Thank you for your bug report and
> patience in explaining it.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/956268
>
> Title:
> Confusing message in bottom panel when parent has changes
>
> Status in Bazaar Explorer:
> Fix Released
>
> Bug description:
> Ubuntu - 11.04
> Bazaar - 2.5.0 (from archive PPA)
> Bazaar Explorer - 1.2.2
>
> Setup:
> * I have a branch called feature-x which is a branch of trunk.
> * Some changes have been made to trunk and not yet merged into
> feature-x.
> * Open branch in Bazaar Explorer.
> * The top panel shows some modifications to the working tree of the
> branch.
> * The bottom panel shows modifications present on trunk.
> * The message in the bottom panel reads...
>
> "Branch has changes not present in its parent branch".
>
> Shouldn't this message be something more like "Parent Branch has
> changes not yet present in this branch"?
>
> Please accept my apologies if I have misunderstood something.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/bzr-explorer/+bug/956268/+subscriptions
>

Alexander Belchenko (bialix) wrote :

> ... and the team.

Heh :-(

Oh dear... ok thank you Alex! :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments