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
(37)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 44350043: cmd/plugins: juju restore plugin

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by rog
Modified:
12 years ago
Reviewers:
mp+199711, thumper
Visibility:
Public.
cmd/plugins: juju restore plugin We also tweak the juju backup plugin so that it preserves user name and other file metadata. Verified live. https://code.launchpad.net/~rogpeppe/juju-core/470-juju-restore/+merge/199711 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/plugins: juju restore plugin #

Total comments: 7

Patch Set 3 : cmd/plugins: juju restore plugin #

Patch Set 4 : cmd/plugins: juju restore plugin #

Created: 12 years ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -101 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/plugins/juju-backup/juju-backup View 5 chunks +12 lines, -13 lines 0 comments Download
M cmd/plugins/juju-restore/restore.go View 1 2 3 4 chunks +332 lines, -87 lines 0 comments Download
M environs/bootstrap/state.go View 1 chunk +1 line, -1 line 0 comments Download
Total messages: 6
|
rog
Please take a look.
12 years ago (2013年12月19日 20:06:26 UTC) #1
Please take a look.
Sign in to reply to this message.
thumper
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/restore.go File cmd/plugins/juju-restore/restore.go (right): https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/restore.go#newcode82 cmd/plugins/juju-restore/restore.go:82: return nil Many commands use 'return cmd.CheckEmpty(args[1:])' in this ...
12 years ago (2013年12月19日 21:59:02 UTC) #2
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
File cmd/plugins/juju-restore/restore.go (right):
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
cmd/plugins/juju-restore/restore.go:82: return nil
Many commands use 'return cmd.CheckEmpty(args[1:])' in this situation to
explicitly error if given too many positional args.
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
cmd/plugins/juju-restore/restore.go:87: tar xzf juju-backup.tgz
what if the filename isn't juju-backup.tgz?
Sign in to reply to this message.
rog
Does this look good to you otherwise? https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/restore.go File cmd/plugins/juju-restore/restore.go (right): https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/restore.go#newcode82 cmd/plugins/juju-restore/restore.go:82: return nil ...
12 years ago (2013年12月20日 00:11:37 UTC) #3
Does this look good to you otherwise?
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
File cmd/plugins/juju-restore/restore.go (right):
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
cmd/plugins/juju-restore/restore.go:82: return nil
On 2013年12月19日 21:59:03, thumper wrote:
> Many commands use 'return cmd.CheckEmpty(args[1:])' in this situation to
> explicitly error if given too many positional args.
I prefer a better error message.
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
cmd/plugins/juju-restore/restore.go:87: tar xzf juju-backup.tgz
On 2013年12月19日 21:59:03, thumper wrote:
> what if the filename isn't juju-backup.tgz?
That is what we copy the file to. It would probably be more obvious if this
script was defined closer to its use, below
Sign in to reply to this message.
thumper
LGTM - although I still think you should be explicit in the handling of unused ...
12 years ago (2013年12月20日 01:17:28 UTC) #4
LGTM - although I still think you should be explicit in the handling of unused
positional args.
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
File cmd/plugins/juju-restore/restore.go (right):
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
cmd/plugins/juju-restore/restore.go:82: return nil
On 2013年12月20日 00:11:37, rog wrote:
> On 2013年12月19日 21:59:03, thumper wrote:
> > Many commands use 'return cmd.CheckEmpty(args[1:])' in this situation to
> > explicitly error if given too many positional args.
> 
> I prefer a better error message.
What error message? You don't error out if they give you parameters that you are
not going to use.
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
cmd/plugins/juju-restore/restore.go:87: tar xzf juju-backup.tgz
On 2013年12月20日 00:11:37, rog wrote:
> On 2013年12月19日 21:59:03, thumper wrote:
> > what if the filename isn't juju-backup.tgz?
> 
> That is what we copy the file to. It would probably be more obvious if this
> script was defined closer to its use, below
Ah... I see now
Sign in to reply to this message.
rog
Please take a look. https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/restore.go File cmd/plugins/juju-restore/restore.go (right): https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/restore.go#newcode82 cmd/plugins/juju-restore/restore.go:82: return nil On 2013年12月20日 01:17:28, ...
12 years ago (2013年12月20日 08:48:19 UTC) #5
Please take a look.
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
File cmd/plugins/juju-restore/restore.go (right):
https://codereview.appspot.com/44350043/diff/20001/cmd/plugins/juju-restore/r...
cmd/plugins/juju-restore/restore.go:82: return nil
On 2013年12月20日 01:17:28, thumper wrote:
> On 2013年12月20日 00:11:37, rog wrote:
> > On 2013年12月19日 21:59:03, thumper wrote:
> > > Many commands use 'return cmd.CheckEmpty(args[1:])' in this situation to
> > > explicitly error if given too many positional args.
> > 
> > I prefer a better error message.
> 
> What error message? You don't error out if they give you parameters that you
are
> not going to use.
Ah, sorry, I'd missed that. Done.
Sign in to reply to this message.
rog
Please take a look.
12 years ago (2013年12月20日 15:35:15 UTC) #6
Please take a look.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

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