Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(607)

Issue 5753057: Rudimentary hook execution functionality

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by fwereade
Modified:
12 years, 2 months ago
Reviewers:
mp+96166
Visibility:
Public.

Description

https://code.launchpad.net/~fwereade/juju/go-hook-package/+merge/96166 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Rudimentary hook execution functionality #

Total comments: 2

Patch Set 3 : Rudimentary hook execution functionality #

Total comments: 6

Patch Set 4 : Rudimentary hook execution functionality #

Total comments: 1

Patch Set 5 : Rudimentary hook execution functionality #

Total comments: 2

Patch Set 6 : Rudimentary hook execution functionality #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -0 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A hook/exec.go View 1 2 3 4 1 chunk +55 lines, -0 lines 0 comments Download
A hook/exec_test.go View 1 2 3 4 1 chunk +103 lines, -0 lines 0 comments Download

Messages

Total messages: 12
fwereade
Please take a look.
12 years, 2 months ago (2012-03-06 16:13:58 UTC) #1
fwereade
Please take a look.
12 years, 2 months ago (2012-03-06 16:16:46 UTC) #2
niemeyer
https://codereview.appspot.com/5753057/diff/2002/hook/exec.go File hook/exec.go (right): https://codereview.appspot.com/5753057/diff/2002/hook/exec.go#newcode17 hook/exec.go:17: var JUJUC_PATH = "/usr/bin/jujuc" If nothing else, this shouldn't ...
12 years, 2 months ago (2012-03-12 18:33:33 UTC) #3
fwereade
Please take a look.
12 years, 2 months ago (2012-03-13 12:56:40 UTC) #4
niemeyer
That's much better, thanks William. A few additional details: https://codereview.appspot.com/5753057/diff/6001/hook/exec.go File hook/exec.go (right): https://codereview.appspot.com/5753057/diff/6001/hook/exec.go#newcode12 hook/exec.go:12: ...
12 years, 2 months ago (2012-03-13 22:05:40 UTC) #5
rog
LGTM with one minor query. https://codereview.appspot.com/5753057/diff/6001/hook/exec.go File hook/exec.go (right): https://codereview.appspot.com/5753057/diff/6001/hook/exec.go#newcode55 hook/exec.go:55: stat, err := os.Stat(path) ...
12 years, 2 months ago (2012-03-14 08:39:55 UTC) #6
fwereade
Please take a look.
12 years, 2 months ago (2012-03-14 15:11:17 UTC) #7
rog
https://codereview.appspot.com/5753057/diff/14001/hook/exec.go File hook/exec.go (right): https://codereview.appspot.com/5753057/diff/14001/hook/exec.go#newcode17 hook/exec.go:17: Flush() error i'm not sure why this method needs ...
12 years, 2 months ago (2012-03-14 15:58:21 UTC) #8
fwereade
Please take a look.
12 years, 2 months ago (2012-03-14 17:31:48 UTC) #9
niemeyer
LGTM, sorry for the trouble on this one.
12 years, 2 months ago (2012-03-14 17:41:46 UTC) #10
rog
LGTM https://codereview.appspot.com/5753057/diff/17001/hook/exec.go File hook/exec.go (right): https://codereview.appspot.com/5753057/diff/17001/hook/exec.go#newcode38 hook/exec.go:38: func isImportant(err error) bool { i think i'd ...
12 years, 2 months ago (2012-03-14 17:43:11 UTC) #11
fwereade
12 years, 2 months ago (2012-03-14 17:54:48 UTC) #12
*** Submitted:

Rudimentary hook execution functionality

R=niemeyer, rog
CC=
https://codereview.appspot.com/5753057

https://codereview.appspot.com/5753057/diff/6001/hook/exec.go
File hook/exec.go (right):

https://codereview.appspot.com/5753057/diff/6001/hook/exec.go#newcode55
hook/exec.go:55: stat, err := os.Stat(path)
On 2012/03/14 08:39:55, rog wrote:
> is it worth calling Stat here? can't we just rely on the error from calling
Run?

I don't want to have to distinguish between different kinds of errors out of
Run() to detect the "it's ok, hook didn't exist, that's perfectly normal" case;
and then, since we've got the stat already, we may as well check and bomb out
early if we know it won't be executable.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b