You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Benjamin Hindman <be...@berkeley.edu> on 2013/10/22 01:58:08 UTC

Review Request 14812: Ignore command line arguments that are not flags.

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

Review request for mesos, Ben Mahler and Vinod Kone.


Repository: mesos-git


Description
-------

See summary.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp 6cd4c48349c2c296816e521f6a015a6cb03a96cc 
  3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 2809280951da562a59914c6c619162d739b38a89 

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


Testing
-------

make check


Thanks,

Benjamin Hindman


Re: Review Request 14812: Ignore command line arguments that are not flags.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14812/#review27448
-----------------------------------------------------------

Ship it!


Modulo comments, at least I don't think we should be looking at argv[0].

- Ben Mahler


On Oct. 21, 2013, 11:58 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14812/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2013, 11:58 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp 6cd4c48349c2c296816e521f6a015a6cb03a96cc 
>   3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 2809280951da562a59914c6c619162d739b38a89 
> 
> Diff: https://reviews.apache.org/r/14812/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


Re: Review Request 14812: Ignore command line arguments that are not flags.

Posted by Benjamin Hindman <be...@berkeley.edu>.

> On Oct. 23, 2013, 6:46 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp, line 321
> > <https://reviews.apache.org/r/14812/diff/1/?file=369063#file369063line321>
> >
> >     Why do you look at argv[0]?

This was an artifact of originally returning a Try<list<string>> that included all of arguments that were not parsed as flags. Reverted, thanks!


> On Oct. 23, 2013, 6:46 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp, lines 324-338
> > <https://reviews.apache.org/r/14812/diff/1/?file=369063#file369063line324>
> >
> >     You could clean this up a bit by moving the name, value down and killing the else block:
> >     
> >     if (arg.find("--") != 0) {
> >       continue;
> >     }
> >     
> >     std::string name;
> >     Option<std::string> value;
> >     
> >     if (eq == ....)

Great! Thanks!


- Benjamin


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


On Oct. 21, 2013, 11:58 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14812/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2013, 11:58 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp 6cd4c48349c2c296816e521f6a015a6cb03a96cc 
>   3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 2809280951da562a59914c6c619162d739b38a89 
> 
> Diff: https://reviews.apache.org/r/14812/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


Re: Review Request 14812: Ignore command line arguments that are not flags.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14812/#review27397
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp
<https://reviews.apache.org/r/14812/#comment53245>

    Why do you look at argv[0]?



3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp
<https://reviews.apache.org/r/14812/#comment53246>

    You could clean this up a bit by moving the name, value down and killing the else block:
    
    if (arg.find("--") != 0) {
      continue;
    }
    
    std::string name;
    Option<std::string> value;
    
    if (eq == ....)


- Ben Mahler


On Oct. 21, 2013, 11:58 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14812/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2013, 11:58 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp 6cd4c48349c2c296816e521f6a015a6cb03a96cc 
>   3rdparty/libprocess/3rdparty/stout/tests/flags_tests.cpp 2809280951da562a59914c6c619162d739b38a89 
> 
> Diff: https://reviews.apache.org/r/14812/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>