Discussion:
Feature Request: svn status should provide a conflict check functionality via exit code
H.-Dirk Schmitt
2018-01-08 23:16:42 UTC
Permalink
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
Daniel Shahaf
2018-01-09 09:51:21 UTC
Permalink
Post by H.-Dirk Schmitt
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“.
- 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.
The usual answer to this is "grep for a 'C' in the first, second, or
seventh column" (for text/prop/tree conflicts respectively), but I can
see how future versions might add messages (such as "Summary of
conflicts:" or "--- Changelist 'foo':") that would match those grep
patterns (as false positives). The best (current?) way to mitigate this
risk is to use 'svn status --xml'.

Cheers,

Daniel

Loading...