Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-12-08 Thread Andrew Schwartzmeyer

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


Ship it!




Ship It!

- Andrew Schwartzmeyer


On Dec. 7, 2017, 6:43 p.m., Jeff Coffler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60622/
> ---
> 
> (Updated Dec. 7, 2017, 6:43 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, Li 
> Li, and Michael Park.
> 
> 
> Bugs: MESOS-6705
> https://issues.apache.org/jira/browse/MESOS-6705
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new stout function: path::from_uri, which converts to a filepath
> from a URI.
> 
> Also added uri::from_path, which generates a URI from a file path.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/Makefile.am b1318847df486f9f96c8b005998310bb56af91a9 
>   3rdparty/stout/include/Makefile.am 4ba91bbedecbe7914cf9f5c6a815b60ca02f0e01 
>   3rdparty/stout/include/stout/path.hpp 
> 6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
>   3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
>   3rdparty/stout/tests/CMakeLists.txt 
> bc2498d6fca1161c42172f5bd09a32785e0a2128 
>   3rdparty/stout/tests/path_tests.cpp 
> f8c14d5aefe0b49adb778da784143a328c96183d 
>   3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60622/diff/7/
> 
> 
> Testing
> ---
> 
> See upstream
> 
> 
> Thanks,
> 
> Jeff Coffler
> 
>



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-12-07 Thread Jeff Coffler


> On Nov. 16, 2017, 6:08 p.m., Michael Park wrote:
> > 3rdparty/stout/include/stout/uri.hpp
> > Lines 19 (patched)
> > 
> >
> > This looks like an accidental include?

Yup, good catch, thanks.


> On Nov. 16, 2017, 6:08 p.m., Michael Park wrote:
> > 3rdparty/stout/include/stout/uri.hpp
> > Lines 31 (patched)
> > 
> >
> > This should be `#ifdef __WINDOWS__`, right?

Yup. And line 34 should have included `// __WINDOWS__` at the end.


- Jeff


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


On Nov. 6, 2017, 6:08 p.m., Jeff Coffler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60622/
> ---
> 
> (Updated Nov. 6, 2017, 6:08 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, Li 
> Li, and Michael Park.
> 
> 
> Bugs: MESOS-6705
> https://issues.apache.org/jira/browse/MESOS-6705
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new stout function: path::from_uri, which converts to a filepath
> from a URI.
> 
> Also added uri::from_path, which generates a URI from a file path.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
>   3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
>   3rdparty/stout/include/stout/path.hpp 
> 6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
>   3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
>   3rdparty/stout/tests/CMakeLists.txt 
> 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
>   3rdparty/stout/tests/path_tests.cpp 
> f8c14d5aefe0b49adb778da784143a328c96183d 
>   3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60622/diff/6/
> 
> 
> Testing
> ---
> 
> See upstream
> 
> 
> Thanks,
> 
> Jeff Coffler
> 
>



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-12-07 Thread Jeff Coffler

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

(Updated Dec. 8, 2017, 2:43 a.m.)


Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, Li Li, 
and Michael Park.


Bugs: MESOS-6705
https://issues.apache.org/jira/browse/MESOS-6705


Repository: mesos


Description
---

Added new stout function: path::from_uri, which converts to a filepath
from a URI.

Also added uri::from_path, which generates a URI from a file path.


Diffs (updated)
-

  3rdparty/stout/Makefile.am b1318847df486f9f96c8b005998310bb56af91a9 
  3rdparty/stout/include/Makefile.am 4ba91bbedecbe7914cf9f5c6a815b60ca02f0e01 
  3rdparty/stout/include/stout/path.hpp 
6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
  3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
  3rdparty/stout/tests/CMakeLists.txt bc2498d6fca1161c42172f5bd09a32785e0a2128 
  3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d 
  3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 


Diff: https://reviews.apache.org/r/60622/diff/7/

Changes: https://reviews.apache.org/r/60622/diff/6-7/


Testing
---

See upstream


Thanks,

Jeff Coffler



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-11-16 Thread Michael Park

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


Fix it, then Ship it!





3rdparty/stout/include/stout/uri.hpp
Lines 19 (patched)


This looks like an accidental include?



3rdparty/stout/include/stout/uri.hpp
Lines 31 (patched)


This should be `#ifdef __WINDOWS__`, right?


- Michael Park


On Nov. 6, 2017, 10:08 a.m., Jeff Coffler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60622/
> ---
> 
> (Updated Nov. 6, 2017, 10:08 a.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, Li 
> Li, and Michael Park.
> 
> 
> Bugs: MESOS-6705
> https://issues.apache.org/jira/browse/MESOS-6705
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new stout function: path::from_uri, which converts to a filepath
> from a URI.
> 
> Also added uri::from_path, which generates a URI from a file path.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
>   3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
>   3rdparty/stout/include/stout/path.hpp 
> 6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
>   3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
>   3rdparty/stout/tests/CMakeLists.txt 
> 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
>   3rdparty/stout/tests/path_tests.cpp 
> f8c14d5aefe0b49adb778da784143a328c96183d 
>   3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60622/diff/6/
> 
> 
> Testing
> ---
> 
> See upstream
> 
> 
> Thanks,
> 
> Jeff Coffler
> 
>



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-10-19 Thread Jeff Coffler

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

(Updated Oct. 19, 2017, 9:33 p.m.)


Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, and Li 
Li.


Bugs: MESOS-6705
https://issues.apache.org/jira/browse/MESOS-6705


Repository: mesos


Description
---

Added new stout function: path::from_uri, which converts to a filepath
from a URI.

Also added uri::from_path, which generates a URI from a file path.


Diffs (updated)
-

  3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
  3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
  3rdparty/stout/include/stout/path.hpp 
6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
  3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
  3rdparty/stout/tests/CMakeLists.txt 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
  3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d 
  3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 


Diff: https://reviews.apache.org/r/60622/diff/6/

Changes: https://reviews.apache.org/r/60622/diff/5-6/


Testing
---

See upstream


Thanks,

Jeff Coffler



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-10-19 Thread Andrew Schwartzmeyer

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


Ship it!




Ship It!

- Andrew Schwartzmeyer


On Oct. 19, 2017, 11:16 a.m., Jeff Coffler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60622/
> ---
> 
> (Updated Oct. 19, 2017, 11:16 a.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, and 
> Li Li.
> 
> 
> Bugs: MESOS-6705
> https://issues.apache.org/jira/browse/MESOS-6705
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new stout function: path::from_uri, which converts to a filepath
> from a URI.
> 
> Also added uri::from_path, which generates a URI from a file path.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
>   3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
>   3rdparty/stout/include/stout/path.hpp 
> 6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
>   3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
>   3rdparty/stout/tests/CMakeLists.txt 
> 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
>   3rdparty/stout/tests/path_tests.cpp 
> f8c14d5aefe0b49adb778da784143a328c96183d 
>   3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60622/diff/5/
> 
> 
> Testing
> ---
> 
> See upstream
> 
> 
> Thanks,
> 
> Jeff Coffler
> 
>



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-10-19 Thread Jeff Coffler


> On Oct. 17, 2017, 11:21 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/include/stout/path.hpp
> > Lines 45-52 (patched)
> > 
> >
> > The `startsWith` is unecessary. This can be replaced with one line:
> > 
> > ```
> > std::string path = strings::remove(path, "file://", strings::PREFIX);`
> > ```
> > 
> > Since `strings::remove` is idempotent.

Changed.


> On Oct. 17, 2017, 11:21 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/include/stout/path.hpp
> > Lines 47 (patched)
> > 
> >
> > nit: comments must end with `.`

Ok.


> On Oct. 17, 2017, 11:21 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/include/stout/path.hpp
> > Lines 48 (patched)
> > 
> >
> > nit: whitespace

Ok.


> On Oct. 17, 2017, 11:21 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/include/stout/path.hpp
> > Lines 49-50 (patched)
> > 
> >
> > nit: open brace should be on line with `if`

Refactored out due to prior change.


> On Oct. 17, 2017, 11:21 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/include/stout/uri.hpp
> > Lines 24 (patched)
> > 
> >
> > nit: comment must end with a `.`, and this should perhaps mention why 
> > we replace `` with `/` on Windows.

Ok.


- Jeff


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


On Oct. 17, 2017, 1:17 a.m., Jeff Coffler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60622/
> ---
> 
> (Updated Oct. 17, 2017, 1:17 a.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, and 
> Li Li.
> 
> 
> Bugs: MESOS-6705
> https://issues.apache.org/jira/browse/MESOS-6705
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new stout function: path::from_uri, which converts to a filepath
> from a URI.
> 
> Also added uri::from_path, which generates a URI from a file path.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
>   3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
>   3rdparty/stout/include/stout/path.hpp 
> 6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
>   3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
>   3rdparty/stout/tests/CMakeLists.txt 
> 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
>   3rdparty/stout/tests/path_tests.cpp 
> f8c14d5aefe0b49adb778da784143a328c96183d 
>   3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60622/diff/4/
> 
> 
> Testing
> ---
> 
> See upstream
> 
> 
> Thanks,
> 
> Jeff Coffler
> 
>



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-10-19 Thread Jeff Coffler

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

(Updated Oct. 19, 2017, 6:16 p.m.)


Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, and Li 
Li.


Bugs: MESOS-6705
https://issues.apache.org/jira/browse/MESOS-6705


Repository: mesos


Description
---

Added new stout function: path::from_uri, which converts to a filepath
from a URI.

Also added uri::from_path, which generates a URI from a file path.


Diffs (updated)
-

  3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
  3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
  3rdparty/stout/include/stout/path.hpp 
6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
  3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
  3rdparty/stout/tests/CMakeLists.txt 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
  3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d 
  3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 


Diff: https://reviews.apache.org/r/60622/diff/5/

Changes: https://reviews.apache.org/r/60622/diff/4-5/


Testing
---

See upstream


Thanks,

Jeff Coffler



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-10-17 Thread Andrew Schwartzmeyer

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




3rdparty/stout/include/stout/path.hpp
Lines 45-52 (patched)


The `startsWith` is unecessary. This can be replaced with one line:

```
std::string path = strings::remove(path, "file://", strings::PREFIX);`
```

Since `strings::remove` is idempotent.



3rdparty/stout/include/stout/path.hpp
Lines 47 (patched)


nit: comments must end with `.`



3rdparty/stout/include/stout/path.hpp
Lines 48 (patched)


nit: whitespace



3rdparty/stout/include/stout/path.hpp
Lines 49-50 (patched)


nit: open brace should be on line with `if`



3rdparty/stout/include/stout/uri.hpp
Lines 24 (patched)


nit: comment must end with a `.`, and this should perhaps mention why we 
replace `` with `/` on Windows.


- Andrew Schwartzmeyer


On Oct. 16, 2017, 6:17 p.m., Jeff Coffler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60622/
> ---
> 
> (Updated Oct. 16, 2017, 6:17 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, and 
> Li Li.
> 
> 
> Bugs: MESOS-6705
> https://issues.apache.org/jira/browse/MESOS-6705
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added new stout function: path::from_uri, which converts to a filepath
> from a URI.
> 
> Also added uri::from_path, which generates a URI from a file path.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
>   3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
>   3rdparty/stout/include/stout/path.hpp 
> 6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
>   3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
>   3rdparty/stout/tests/CMakeLists.txt 
> 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
>   3rdparty/stout/tests/path_tests.cpp 
> f8c14d5aefe0b49adb778da784143a328c96183d 
>   3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60622/diff/4/
> 
> 
> Testing
> ---
> 
> See upstream
> 
> 
> Thanks,
> 
> Jeff Coffler
> 
>



Re: Review Request 60622: Added new stout functions for path and URI conversions.

2017-10-16 Thread Jeff Coffler

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

(Updated Oct. 17, 2017, 1:17 a.m.)


Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, and Li 
Li.


Summary (updated)
-

Added new stout functions for path and URI conversions.


Bugs: MESOS-6705
https://issues.apache.org/jira/browse/MESOS-6705


Repository: mesos


Description (updated)
---

Added new stout function: path::from_uri, which converts to a filepath
from a URI.

Also added uri::from_path, which generates a URI from a file path.


Diffs (updated)
-

  3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
  3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
  3rdparty/stout/include/stout/path.hpp 
6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
  3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
  3rdparty/stout/tests/CMakeLists.txt 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
  3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d 
  3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 


Diff: https://reviews.apache.org/r/60622/diff/4/

Changes: https://reviews.apache.org/r/60622/diff/3-4/


Testing
---

See upstream


Thanks,

Jeff Coffler