Feature Request: svn status should provide a conflict check functionality via exit code
Hello ! i missing an easy way to check a local checkout for conflicts. Currently I'm grep the output of svn status for the existence of the phrase „Summary of conflicts“. This is ugly: - needs LC_ALL=C ensurance - may break in future versions of my the svn client. A better way would to have an --check-conflict option which would ensure an non-zero exit code if any conflict is detected. Best Reagrads, H.-Dirk Schmitt
Missing LOCALE in post-commit hook leads to weird behaviour of `svnlook log` with unicode characters – broken transliterations
I found a very weird behaviour of `svnlook log` that IMHO is a bug (or at least a serious missing documentation issue). Introduction Consider a log message like: 'Unicode Test → ø ÄÖÜ' `svnlook log` invoked in a normal terminal session shows the proper content. This works because the environment is set to 'en_US.UTF-8'. Now start to play - `env LC_ALL=C.UTF-8 svnlook log` also shows a correct result. Problem --- But falling back to `env LC_ALL=C svnlook log` I got a very flawed result: Unicode Test {U+2192} {U+00F8} AOU → and ø are replaced with there code description The German Umlaut chars are translitterated in a very uncommon way. In the old ASCII/type-writer days Ä was translitterated in Ae (Ö → Oe, …) Why is this behaviour not a cosmetic problem. - Consider a post-commit hook fetching the commit message with `svnlook log`. Purpose is to postprocess the log message content, e.g. append to bugzilla issues. The actual setup is svn+apache2 and a bash script as post commit hook. The machine locatle as reported by `localectl`: System Locale: LANG=en_US.utf8 All the commit messages content transfered is broken as described above. This happens because the post-commit hook is running with a very reduced set of environment variables: PWD=/ SHLVL=1 Especially `LC_ALL` is not set which is eqivalent to `LC_ALL=C`. Suggested Mitigation/Fixing --- 1. Subversion should ensure that the system locale is forwarded to the post-commit hook. 2. `svnlook` shoud support the `--encoding` switch 3. German Umlaute (and surely some other national characters in the 8- bit range) shouldn't translittered in a different way as unicode characters (see ø / {U+00F8}). PS: Google et. al. haven't shown that this issue is well documented.
Missing LOCALE in post-commit hook leads to weird behaviour of `svnlook log` with unicode characters – broken transliterations
I found a very weird behaviour of `svnlook log` that IMHO is a bug (or at least a serious missing documentation issue). Introduction Consider a log message like: 'Unicode Test → ø ÄÖÜ' `svnlook log` invoked in a normal terminal session shows the proper content. This works because the environment is set to 'en_US.UTF-8'. Now start to play - `env LC_ALL=C.UTF-8 svnlook log` also shows a correct result. Problem --- But falling back to `env LC_ALL=C svnlook log` I got a very flawed result: Unicode Test {U+2192} {U+00F8} AOU → and ø are replaced with there code description The German Umlaut chars are translitterated in a very uncommon way. In the old ASCII/type-writer days Ä was translitterated in Ae (Ö → Oe, …) Why is this behaviour not a cosmetic problem. - Consider a post-commit hook fetching the commit message with `svnlook log`. Purpose is to postprocess the log message content, e.g. append to bugzilla issues. The actual setup is svn+apache2 and a bash script as post commit hook. The machine locatle as reported by `localectl`: System Locale: LANG=en_US.utf8 All the commit messages content transfered is broken as described above. This happens because the post-commit hook is running with a very reduced set of environment variables: PWD=/ SHLVL=1 Especially `LC_ALL` is not set which is eqivalent to `LC_ALL=C`. Suggested Mitigation/Fixing --- 1. Subversion should ensure that the system locale is forwarded to the post-commit hook. 2. `svnlook` shoud support the `--encoding` switch 3. German Umlaute (and surely some other national characters in the 8- bit range) shouldn't translittered in a different way as unicode characters (see ø / {U+00F8}). PS: Google et. al. haven't shown that this issue is well documented.
Re: Missing LOCALE in post-commit hook leads to weird behaviour of `svnlook log` with unicode characters – broken transliterations
Stefan Sperling : > On Sat, Jan 27, 2018 at 06:35:17PM +0100, H.-Dirk Schmitt wrote: > > All the commit messages content transfered is broken as described > > above. > > > > This happens because the post-commit hook is running with a very > > reduced set of environment variables: > >PWD=/ > >SHLVL=1 > > See http://subversion.apache.org/docs/release-notes/1.8.html#hooks-en > v > and http://subversion.apache.org/docs/release-notes/1.8.html#mod-dav- > svn-utf8 Johan Corveleyn : > This is documented in the official documentation (the "SVN Book"): > [...] > (see the first sentence there: "By default, Subversion executes hook > scripts with an empty environment—that is, no environment variables > are set at all, not even $PATH (or %PATH%, under Windows).") OK - My „Postscriptum“ was not correct - my apologies. But still valid are the the points: - Broken transliteration of German Umlaut. - Subversion is ignoring the machine locate settings which should normally the default if not overwritten in the Environment. This is a considerable bad behaviour for a linux/unix application. -- Signature H.-Dirk Schmitt H.-Dirk Schmitt Dipl.Math. eMail:dirk.schm...@computer42.org mobile:+49 177 616 8564 phone: +49 2642 99 41 14 fax: +49 2642 99 41 15 Schillerstr. 42, D-53489 Sinzig pgp: http://www.computer42.org/~dirk/OpenPGP-fingerprint.html