-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42860/#review124577
-----------------------------------------------------------
Given `{"/usr/lib", "/usr/lib64"}`, this returns "/usr/lib". Given
`{"/usr-/xxx", "/usr", "/usr/baz"}`, this returns "/usr". Both seem incorrect.
3rdparty/libprocess/3rdparty/stout/include/stout/path.hpp (line 68)
<https://reviews.apache.org/r/42860/#comment187196>
I agree with Benjamin: the semantics of this function are very unclear. At
minimum it needs a header comment to identify what the function returns. I also
don't think it should be called `sameParent` if it doesn't return a
boolean/`Try<Nothing>`.
3rdparty/libprocess/3rdparty/stout/include/stout/path.hpp (line 70)
<https://reviews.apache.org/r/42860/#comment187193>
`if (paths.empty()) { ... }` seems like a clearer way to write this.
- Neil Conway
On Jan. 28, 2016, 2:12 a.m., haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42860/
> -----------------------------------------------------------
>
> (Updated Jan. 28, 2016, 2:12 a.m.)
>
>
> Review request for mesos, Jie Yu and Joris Van Remoortere.
>
>
> Bugs: MESOS-4521
> https://issues.apache.org/jira/browse/MESOS-4521
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Add paths::sameParent to find out the same root of a path list.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/path.hpp
> ef538045a8b7a1e3d8962c869317d86a85e0259f
> 3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
> 6dff5e76e0e15098c5a262adc50bfcb65f933697
>
> Diff: https://reviews.apache.org/r/42860/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> haosdent huang
>
>