Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-09 Thread Michael Park

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/
---

(Updated July 9, 2015, 5:07 p.m.)


Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till Toenshoff.


Changes
---

Remove unicode characters copy/pasted from `reviewboardrc` documentation.


Repository: mesos


Description (updated)
---

Handles the case where the ReviewBoard URL is invalid.

```
af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
(29 seconds ago)

Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
```

Reads `REVIEWBOARD_URL` from `.reviewboardrc` if it's available. We use 
`imp.load_source` to import the `.reviewboardrc` file.
> __.reviewboardrc__
>
> The .reviewboardrc file is a generic place for configuring a repository. This 
> must be in a directory in the user's checkout path to work. __It must parse 
> as a valid Python file__, or you'll see an error when using rbt.


Diffs
-

  support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 

Diff: https://reviews.apache.org/r/35777/diff/


Testing
---

Modified the commit message with `git rebase` and ran 
`./support/post-reviews.py` to observe the above error messages.
Used the valid commit message for this patch and created it by running 
`./support/post-reviews.py`.


Thanks,

Michael Park



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-09 Thread Till Toenshoff

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review91110
---

Ship it!



support/post-reviews.py (lines 106 - 119)


Nice addition.


- Till Toenshoff


On July 8, 2015, 9:18 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 8, 2015, 9:18 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> Reads `REVIEWBOARD_URL` from `.reviewboardrc` if it's available. We use 
> `imp.load_source` to import the `.reviewboardrc` file.
> > __.reviewboardrc__
> >
> > The .reviewboardrc file is a generic place for configuring a repository. 
> > This must be in a directory in the user’s checkout path to work. __It must 
> > parse as a valid Python file__, or you’ll see an error when using rbt.
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-08 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review91048
---


Patch looks great!

Reviews applied: [35777]

All tests passed.

- Mesos ReviewBot


On July 8, 2015, 9:18 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 8, 2015, 9:18 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> Reads `REVIEWBOARD_URL` from `.reviewboardrc` if it's available. We use 
> `imp.load_source` to import the `.reviewboardrc` file.
> > __.reviewboardrc__
> >
> > The .reviewboardrc file is a generic place for configuring a repository. 
> > This must be in a directory in the user’s checkout path to work. __It must 
> > parse as a valid Python file__, or you’ll see an error when using rbt.
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-08 Thread Marco Massenzio


> On July 7, 2015, 9:32 p.m., Marco Massenzio wrote:
> > support/post-reviews.py, line 173
> > 
> >
> > note that here you will be printing the whole commit message, which in 
> > this case is not appropriate.
> > 
> > I would do instead:
> > ```
> > pos = message.find('Review:')
> > if pos != -1:
> > ...
> > print ...format(message[pos:])
> > ```
> > should make the error message clearer.
> 
> Marco Massenzio wrote:
> ok - to be a bit more pedantic:
> ```
> if pos != -1:
> ...
> if not match:
> newline = max(message.find('\n', pos), len(message))
> print ...format(message[pos:newline])
> ```
> 
> Michael Park wrote:
> I took your first suggestion. I would like to show the full rest of the 
> message if `Review: ...` is not the last line of the commit message.
> 
> It still isn't robust anyway, since we don't check that the line starts 
> with `Review: ` for example. But we can fix those later.

That's cool - thanks for that!
Someone with committer's power (@Till?) should commit this.


- Marco


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90783
---


On July 8, 2015, 9:18 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 8, 2015, 9:18 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> Reads `REVIEWBOARD_URL` from `.reviewboardrc` if it's available. We use 
> `imp.load_source` to import the `.reviewboardrc` file.
> > __.reviewboardrc__
> >
> > The .reviewboardrc file is a generic place for configuring a repository. 
> > This must be in a directory in the user’s checkout path to work. __It must 
> > parse as a valid Python file__, or you’ll see an error when using rbt.
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-08 Thread Michael Park


> On July 7, 2015, 9:32 p.m., Marco Massenzio wrote:
> > support/post-reviews.py, line 173
> > 
> >
> > note that here you will be printing the whole commit message, which in 
> > this case is not appropriate.
> > 
> > I would do instead:
> > ```
> > pos = message.find('Review:')
> > if pos != -1:
> > ...
> > print ...format(message[pos:])
> > ```
> > should make the error message clearer.
> 
> Marco Massenzio wrote:
> ok - to be a bit more pedantic:
> ```
> if pos != -1:
> ...
> if not match:
> newline = max(message.find('\n', pos), len(message))
> print ...format(message[pos:newline])
> ```

I took your first suggestion. I would like to show the full rest of the message 
if `Review: ...` is not the last line of the commit message.

It still isn't robust anyway, since we don't check that the line starts with 
`Review: ` for example. But we can fix those later.


- Michael


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90783
---


On July 8, 2015, 9:18 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 8, 2015, 9:18 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> Reads `REVIEWBOARD_URL` from `.reviewboardrc` if it's available. We use 
> `imp.load_source` to import the `.reviewboardrc` file.
> > __.reviewboardrc__
> >
> > The .reviewboardrc file is a generic place for configuring a repository. 
> > This must be in a directory in the user’s checkout path to work. __It must 
> > parse as a valid Python file__, or you’ll see an error when using rbt.
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-08 Thread Michael Park

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/
---

(Updated July 8, 2015, 9:18 p.m.)


Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till Toenshoff.


Changes
---

Addressed Marco and Vinod's comments.


Repository: mesos


Description (updated)
---

Handles the case where the ReviewBoard URL is invalid.

```
af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
(29 seconds ago)

Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
```

Reads `REVIEWBOARD_URL` from `.reviewboardrc` if it's available. We use 
`imp.load_source` to import the `.reviewboardrc` file.
> __.reviewboardrc__
>
> The .reviewboardrc file is a generic place for configuring a repository. This 
> must be in a directory in the user’s checkout path to work. __It must parse 
> as a valid Python file__, or you’ll see an error when using rbt.


Diffs (updated)
-

  support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 

Diff: https://reviews.apache.org/r/35777/diff/


Testing
---

Modified the commit message with `git rebase` and ran 
`./support/post-reviews.py` to observe the above error messages.
Used the valid commit message for this patch and created it by running 
`./support/post-reviews.py`.


Thanks,

Michael Park



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-07 Thread Marco Massenzio


> On July 7, 2015, 9:32 p.m., Marco Massenzio wrote:
> > support/post-reviews.py, line 173
> > 
> >
> > note that here you will be printing the whole commit message, which in 
> > this case is not appropriate.
> > 
> > I would do instead:
> > ```
> > pos = message.find('Review:')
> > if pos != -1:
> > ...
> > print ...format(message[pos:])
> > ```
> > should make the error message clearer.

ok - to be a bit more pedantic:
```
if pos != -1:
...
if not match:
newline = max(message.find('\n', pos), len(message))
print ...format(message[pos:newline])
```


- Marco


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90783
---


On July 7, 2015, 3:19 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 7, 2015, 3:19 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the 
> commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
> (6 seconds ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-07 Thread Marco Massenzio


> On July 7, 2015, 9:42 p.m., Vinod Kone wrote:
> > support/post-reviews.py, line 173
> > 
> >
> > Why 'format' instead of directly printing the message with a %s? Just 
> > curious.

It's a more portable way of printing - also, using `format()` allows for better 
ways of formatting messages.
Personally, now I'm always using (if I still have to support Python 2.7):
```
from future import __print_function__

...

print("foo bar {baz}".format(baz=something))
```
but that's pedantic me :)


- Marco


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90785
---


On July 7, 2015, 3:19 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 7, 2015, 3:19 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the 
> commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
> (6 seconds ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-07 Thread Vinod Kone

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90785
---



support/post-reviews.py (line 170)


Jie recently refactored this file to avoid using hard coded strings/urls in 
this file so that this script can be used with internal (org specific) repos 
and review servers.

Is there a way you can get the review board url from reviewboardrc isntead?



support/post-reviews.py (line 173)


Why 'format' instead of directly printing the message with a %s? Just 
curious.


- Vinod Kone


On July 7, 2015, 3:19 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 7, 2015, 3:19 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the 
> commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
> (6 seconds ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-07 Thread Marco Massenzio

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90783
---

Ship it!


Minor nit on error message - fix it and commit.
Thanks for fixing this!


support/post-reviews.py (line 173)


note that here you will be printing the whole commit message, which in this 
case is not appropriate.

I would do instead:
```
pos = message.find('Review:')
if pos != -1:
...
print ...format(message[pos:])
```
should make the error message clearer.


- Marco Massenzio


On July 7, 2015, 3:19 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 7, 2015, 3:19 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the 
> commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
> (6 seconds ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-07 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90714
---


Patch looks great!

Reviews applied: [35777]

All tests passed.

- Mesos ReviewBot


On July 7, 2015, 3:19 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 7, 2015, 3:19 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the 
> commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
> (6 seconds ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-07 Thread Michael Park

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/
---

(Updated July 7, 2015, 3:19 p.m.)


Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till Toenshoff.


Changes
---

Addressed Marco's comment.


Repository: mesos


Description
---

(1) Handles the case where the `Review: ...` line isn't the last of the commit 
message.

```
01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
(6 seconds ago)

ReviewBoard URL must be the last line of the commit message!

Fixed post-reviews.py hanging bug.

Review: https://reviews.apache.org/r/35771

abcd
```

(2) Handles the case where the ReviewBoard URL is invalid.

```
af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
(29 seconds ago)

Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
```


Diffs (updated)
-

  support/post-reviews.py b04e26b85e6b056098c15078f9b31dc352682351 

Diff: https://reviews.apache.org/r/35777/diff/


Testing
---

Modified the commit message with `git rebase` and ran 
`./support/post-reviews.py` to observe the above error messages.
Used the valid commit message for this patch and created it by running 
`./support/post-reviews.py`.


Thanks,

Michael Park



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-07-01 Thread Marco Massenzio

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90076
---



support/post-reviews.py (lines 170 - 176)


well, you did The Right Thing, using `re` :)
how about taking it to its natural conclusion:

PATTERN = re.compile('Review: (https://reviews.apache.org/r/[0-9]+)')

then use: `re.search()` (instead of .match) and use `match.group(1)` to 
extract just the URL.

Looks to me like a better User Experience.


- Marco Massenzio


On July 1, 2015, 3:52 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated July 1, 2015, 3:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till 
> Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the 
> commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
> (6 seconds ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py 10861a9eb9739a519732fef02a14dc4514463a8c 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-06-23 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review88957
---


Patch looks great!

Reviews applied: [35777]

All tests passed.

- Mesos ReviewBot


On June 23, 2015, 8:19 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> ---
> 
> (Updated June 23, 2015, 8:19 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the 
> commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
> (6 seconds ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
> (29 seconds ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -
> 
>   support/post-reviews.py 10861a9eb9739a519732fef02a14dc4514463a8c 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> ---
> 
> Modified the commit message with `git rebase` and ran 
> `./support/post-reviews.py` to observe the above error messages.
> Used the valid commit message for this patch and created it by running 
> `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.

2015-06-23 Thread Michael Park

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/
---

Review request for mesos, Benjamin Hindman and Till Toenshoff.


Repository: mesos


Description
---

(1) Handles the case where the `Review: ...` line isn't the last of the commit 
message.

```
01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. 
(6 seconds ago)

ReviewBoard URL must be the last line of the commit message!

Fixed post-reviews.py hanging bug.

Review: https://reviews.apache.org/r/35771

abcd
```

(2) Handles the case where the ReviewBoard URL is invalid.

```
af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. 
(29 seconds ago)

Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
```


Diffs
-

  support/post-reviews.py 10861a9eb9739a519732fef02a14dc4514463a8c 

Diff: https://reviews.apache.org/r/35777/diff/


Testing
---

Modified the commit message with `git rebase` and ran 
`./support/post-reviews.py` to observe the above error messages.
Used the valid commit message for this patch and created it by running 
`./support/post-reviews.py`.


Thanks,

Michael Park