bzr log --short should work with -s too

Bug #38655 reported by James Troup
6
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin von Gagern

Bug Description

'bzr log' doesn't accept -s as a short form for --short, but it'd be nice if it could. Especially since -l is accepted for --long, you expect to be able to use -s for --short. And --show-ids seems sufficently obscure for no one to mind the shortform clash.

Tags: easy log

Related branches

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

Sounds reasonable.

Will require some infrastructure work to make short options per-command.

Changed in bzr:
status: Unconfirmed → Confirmed
Revision history for this message
Tim Powell (theuiguy) wrote :

I took a peek at this because it sounded easy and I thought it'd be convenient.

The initial comment about -l being a short form for --long is no longer true -- it is an abbreviation for limit. However, since --long is the default format it may not matter. You can also set your preferred log format in the bzr config, so the short name may not be as necessary as it might have been in 2006.

Since options support short_names, I thought there wouldn't be much to this change. However, after exploring the code, I am baffled by how --long, --line, and --short work right now. There's a function get_log_format in builtins.py, but as near as I can tell, it's never called and is obsolete. There are _global_options defined in options.py, but even if I add a short_name to the 'short' option, it doesn't work with log. I see there's a _global_option for dry-run as well, but this seems to be redefined in every builtin command, so I don't understand what the global option does. I tried explicitly adding short as an Option to the cmd_log, but that causes an option conflict. Huh? However, I can add s as a short_name for the short Option in the bzr builtin version command and it works fine.

Martin, can you give me a hint? Given the age of this request, I know many things have changed in bzr. Does your comment still apply?

Martin Pool (mbp)
Changed in bzr:
importance: Wishlist → Medium
tags: added: easy log
Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → Martin von Gagern (gagern)
milestone: none → 2.4b4
status: Confirmed → 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.