Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-28 Thread Daniel Shahaf
Daniel Shahaf wrote on Tue, Jan 27, 2015 at 10:14:50 +: [[[ svn --version --verbose: Support /etc/os-release, the systemd what distro am I running API. I've removed -stripping, added whitespace stripping, closed the file before returning, and committed the patch in r1655233. I also added

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Philip Martin
Daniel Shahaf d...@daniel.shahaf.name writes: Where should we introduce dual pools? Every function that returns a result allocated in a pool is a candidate. I think it requires more justification for such a function to be single pool. The callstack is single-pool all the way to the public

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Philip Martin
Daniel Shahaf d...@daniel.shahaf.name writes: +static const char * +systemd_release(apr_pool_t *pool) +{ + svn_error_t *err; + svn_stream_t *stream; + + err = svn_stream_open_readonly(stream, /etc/os-release, pool, pool); + if (err APR_STATUS_IS_ENOENT(err-apr_err)) +{ +

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Daniel Shahaf
Branko Čibej wrote on Tue, Jan 27, 2015 at 11:41:27 +0100: On 27.01.2015 11:14, Daniel Shahaf wrote: + /* Are there exactly two double quotes, at the first and last positions? */ + if (str[0] == '' (second_double_quote = strchr(str+1, '')) + second_double_quote[1] == '\0')

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Branko Čibej
On 27.01.2015 11:14, Daniel Shahaf wrote: [[[ svn --version --verbose: Support /etc/os-release, the systemd what distro am I running API. * subversion/libsvn_subr/sysinfo.c (linux_release_name): Try /etc/os-release if /usr/bin/lsb_release fails. (systemd_release): New helper for

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Stefan Sperling
On Tue, Jan 27, 2015 at 10:14:50AM +, Daniel Shahaf wrote: [[[ svn --version --verbose: Support /etc/os-release, the systemd what distro am I running API. * subversion/libsvn_subr/sysinfo.c (linux_release_name): Try /etc/os-release if /usr/bin/lsb_release fails. (systemd_release):

[PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Daniel Shahaf
[[[ svn --version --verbose: Support /etc/os-release, the systemd what distro am I running API. * subversion/libsvn_subr/sysinfo.c (linux_release_name): Try /etc/os-release if /usr/bin/lsb_release fails. (systemd_release): New helper for linux_release_name(). (remove_shell_quoting): New

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Daniel Shahaf
Stefan Sperling wrote on Tue, Jan 27, 2015 at 11:39:26 +0100: On Tue, Jan 27, 2015 at 10:14:50AM +, Daniel Shahaf wrote: +/* Attempt to strip double quotes from a string. + * + * The string considered is (STR-DATA + OFFSET). If it starts + * and ends with double quotes, and has no

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Daniel Shahaf
Philip Martin wrote on Tue, Jan 27, 2015 at 11:28:35 +: Daniel Shahaf d...@daniel.shahaf.name writes: +static const char * +systemd_release(apr_pool_t *pool) +{ + svn_error_t *err; + svn_stream_t *stream; + + err = svn_stream_open_readonly(stream, /etc/os-release, pool,

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Stefan Sperling
On Tue, Jan 27, 2015 at 11:24:04AM +, Daniel Shahaf wrote: That's what my first version of the patch did, but it resulted in this: System information: * running on x86_64-unknown-linux-gnu - Debian GNU/Linux 7 (wheezy) [Linux 3.2.0-4-amd64] and I figured it was too

Re: [PATCH] svn --version --verbose += /etc/os-release

2015-01-27 Thread Branko Čibej
On 27.01.2015 13:38, Philip Martin wrote: Daniel Shahaf d...@daniel.shahaf.name writes: Where should we introduce dual pools? Every function that returns a result allocated in a pool is a candidate. I think it requires more justification for such a function to be single pool. The