Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 6593044: Add --version option

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by clint.byrum
Modified:
10 years, 4 months ago
Reviewers:
jimbaker , mp+127109
Visibility:
Public.
Add --version option https://code.launchpad.net/~clint-fewbar/juju/add-version-arg/+merge/127109 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Created: 13 years, 3 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M juju/control/__init__.py View 2 chunks +4 lines, -0 lines 1 comment Download
M juju/control/tests/test_control.py View 2 chunks +13 lines, -0 lines 0 comments Download
Total messages: 2
|
clint.byrum
Please take a look.
13 years, 3 months ago (2012年09月29日 16:33:47 UTC) #1
Please take a look.
Sign in to reply to this message.
jimbaker
LGTM with the minor. One thing I noticed is that I would expect the output ...
13 years, 3 months ago (2012年10月03日 22:07:57 UTC) #2
LGTM with the minor. One thing I noticed is that I would expect the output on
stdout, not stderr, so that I can do this
export JUJU_VERSION=$(juju --version)
instead of 
export JUJU_VERSION=$(juju --version 2>1)
Of course this behavior of using stderr is just what argparse does. However, in
a completely random sampling of commands, most print to stdout (ls, xargs, bzr).
One notable exception: python, it uses stderr. Same with java -version.
However, supporting --version like this is going to have to work around the fact
that we use argparse to support subcommands. And anything dealing with
subcommands in argparse is possible, but way too complicated.
So, never mind, let's just do what argparse makes easy :)
https://codereview.appspot.com/6593044/diff/1/juju/control/__init__.py
File juju/control/__init__.py (right):
https://codereview.appspot.com/6593044/diff/1/juju/control/__init__.py#newcod...
juju/control/__init__.py:110: "--version", action="version", version='juju %s' %
(__version__))
version="juju %s" % __version__
would be preferable (we use double quotes uniformly in the Juju codebase).
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /