bzr status should show shelved changes

Bug #403687 reported by Tim Powell
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Parth Malwankar

Bug Description

It's difficult to know when there are shelved changes in a working tree unless you explicitly use bzr shelf list. It feels like it would be better to show files which have shelved changes using the bzr status command. A shelved change is conceptually a special type of "modified" file.

This fits in with Bug #330311 which desires a way to unshelve by filename. In many cases I want to know which files have shelved changes, but shelve wants to show me the changeset/patch/diff instead.

Shelf groups a set of changes as with a normal revision, but confusingly acts quite differently. Shouldn't a shelf act like any other revision?

Related branches

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 403687] [NEW] bzr status should show shelved changes

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

Tim Powell wrote:
> Public bug reported:
>
> It's difficult to know when there are shelved changes in a working tree
> unless you explicitly use bzr shelf list. It feels like it would be
> better to show files which have shelved changes using the bzr status
> command. A shelved change is conceptually a special type of "modified"
> file.

Which set of shelved changes would you use to decide whether to
indicated it as modified?

Would you consider the case where shelved changes have already been
applied to the working tree, meaning that unshelving would not change
the file, despite there being shelved changes for that file?

I think it makes sense for status to indicate when there are shelved
changes, but that doesn't mean it should be done on a per-file basis.
Just "3 sets of changes have been shelved" would remind people of the
shelved changes.

> This fits in with Bug #330311 which desires a way to unshelve by
> filename. In many cases I want to know which files have shelved changes,
> but shelve wants to show me the changeset/patch/diff instead.
>
> Shelf groups a set of changes as with a normal revision, but confusingly
> acts quite differently. Shouldn't a shelf act like any other revision?

A shelf is more like a working tree than a revision. The format
supports all working tree states, including unversioned files. So no,
it's not a revision, and it shouldn't act like one.

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

iEYEARECAAYFAkpovB8ACgkQ0F+nu1YWqI0/lgCeIs8DpORAh4YHgKH18LkvSFsC
LccAn3ncRvpv+HpIdOMx5kwbEdy1pJEe
=vxPB
-----END PGP SIGNATURE-----

Revision history for this message
Martin Pool (mbp) wrote :

I think just showing "there are shelved changes" would be good - at
least it gives you a hint to look at it.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Martin Pool (mbp) wrote :

2009/7/24 Martin Pool <email address hidden>:
> I think just showing "there are shelved changes" would be good - at
> least it gives you a hint to look at it.

... it doesn't have to be that particular string of course, but
something fairly compact would be good.

--
Martin <http://launchpad.net/~mbp/>

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Tim Powell (theuiguy) wrote :

Aaron Bentley wrote:
> Which set of shelved changes would you use to decide whether to
> indicated it as modified?

I would think it'd be any file that has a shelved change. If it's changed on multiple shelves I think I'd still just want to see that the file has a shelved change.

> Would you consider the case where shelved changes have already been
> applied to the working tree, meaning that unshelving would not change
> the file, despite there being shelved changes for that file?

I had not considered this case because I don't think I've ever run into it. Even so, I would think you'd still want to show it as having a shelved change since it's on a shelf.

> I think it makes sense for status to indicate when there are shelved
> changes, but that doesn't mean it should be done on a per-file basis.
> Just "3 sets of changes have been shelved" would remind people of the
> shelved changes.

This would be better than nothing and an improvement from what's there now. Why wouldn't you want to see the files, though? I understand that you may shelve a related set of changes, but that's not always the case.

I suppose that with multiple shelves you might want to show each shelf, shelf id, date and then the files affected, essentially a superset of bzr shelf list that shows the changed files.

> A shelf is more like a working tree than a revision.

I found this helpful and thought provoking, but it feels only partially true. A shelf feels like a diff/patch just like a revision. On the other hand, the changes are local to the working tree and nobody else sees them until they become a revision.

Revision history for this message
Marien Zwart (marienz) wrote :

I just had the exact same idea and implemented it as a plugin, currently sitting in lp:~marienz/+junk/shelfstatus. It adds a single line "%d shelved changes" if there are any. I'm not sure it does the right thing for all switches (I tried to turn it off for modes where "bzr status" uses one filename per line). Still, this might be useful for someone, or as a starting point for implementing this in bzr itself.

Parth Malwankar (parthm)
Changed in bzr:
status: Confirmed → In Progress
assignee: nobody → Parth Malwankar (parthm)
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.3b2
status: In Progress → 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.