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

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 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-po

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

2015-01-27 Thread Philip Martin
Daniel Shahaf 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 entry point svn_versio

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 i

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 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); .

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]

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

2015-01-27 Thread Philip Martin
Daniel Shahaf 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)) > +{ > + svn_error

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

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_re

[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 he