View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0010200 | CMake | Modules | public | 2010-01-29 03:51 | 2016-06-10 14:31 | ||||
Reporter | Marcel Loose | ||||||||
Assigned To | Marcel Loose | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0010200: FindSubversion: Subversion_WC_INFO macro should not do SEND_ERROR | ||||||||
Description | IMHO the macro Subversion_WC_INFO in FindSubversion.cmake should not do a SEND_ERROR, when the 'svn info' command fails. This makes the macro useless if you want to be able to use it both on SVN working copies and SVN exported trees. Either make this behaviour configurable, or change it to STATUS (or WARNING, but that's not supported for CMake < 2.8) See this thread http://www.mail-archive.com/cmake@cmake.org/msg26749.html [^] on the mailing list, where Erik Johansson posted his proposed change. | ||||||||
Tags | FindSubversion | ||||||||
Attached Files | SubversionIsWc.cmake [^] (1,661 bytes) 2011-04-20 06:36 | ||||||||
Relationships | |
Relationships |
Notes | |
(0022040) David Cole (manager) 2010-08-31 16:59 |
We will not be addressing this for the upcoming CMake 2.8.3 release. (Unless the existing module maintainer responds, or a new one comes forward to take up the mantle...) |
(0022210) Marcel Loose (developer) 2010-09-13 10:51 |
I'm a bit hesitant to apply the patch suggested by Erik Johansson. My main objection is the fact that the option ERROR_QUIET not only suppresses the error message, but also ignores it. Two effects influenced by one option: not good. Maybe we should just forget about this ERROR_QUIET option and change the SEND_ERROR into a WARNING? Besides that, Subversion_WC_LOG(<dir>) will also fail when the <dir> is not a working copy, just like Subversion_WC_INFO. |
(0022212) David Cole (manager) 2010-09-13 11:10 |
I think we should leave this one alone. I liked your suggestion, Marcel, in this part of that email thread: http://www.mail-archive.com/cmake@cmake.org/msg26808.html [^] Leave the existing functionality alone: if a Subversion_WC_* macro is invoked on a non-working-copy directory, then it *should* be an error. However, adding the ability to detect whether a directory *is* an svn working copy would be absolutely brilliant. (If 'svn info' succeeds, then it is a working copy... otherwise not -- you don't have to look for existence of ".svn" or anything...) I think we should add a function called "Subversion_IS_WC" that returns true if the directory is a working copy, false otherwise. And leave the existing functions as is. |
(0022371) Marcel Loose (developer) 2010-09-28 09:04 |
Using 'svn info' to check whether a directory is a working copy or not puts the Subversion_WC_INFO in a somewhat strange position. On the one hand you argue that invoking any Subversion_WC_* macro on a non-working copy directory should be treated as an error. On the other hand you suggest to use Subversion_WC_INFO -- well, actually 'svn info' -- to check whether it's a working copy or not. Of course I could implement a Subversion_IS_WC macro that would simply execute 'svn info' and return its result. However, if all I'm really interested in is the WC_INFO stuff, then I'd have to call Subversion_WC_INFO next, which would execute 'svn info' a second time; a bit of a waste. |
(0022372) David Cole (manager) 2010-09-28 10:29 |
I am of the strong opinion that any Subversion_WC_* function should produce an error if called on a non-working-copy directory. Please preserve the error so that projects expecting a working copy will produce an error if given directories that are not working copies. Other than that, I don't really care about any further implementation details. Feel free to fix this as you see fit. |
(0026231) Johannes Wienke (reporter) 2011-04-20 06:37 |
Just in case someone is still interested, I've attached an implementation of Subversion_IS_WC. |
(0026232) Marcel Loose (developer) 2011-04-20 07:12 |
Thanks Johannes. I will have a closer look at it when I have time, but currently I'm very busy. |
(0026965) Aaron C. Meadows (reporter) 2011-06-24 12:41 |
I'm coming late to this discussion, but why not have Subversion_WC_INFO set the variable ${prefix}_FOUND or ${prefix}_NOT_FOUND based on if this is a WC? That would allow all of the state to be externally visible and handled by the caller however they like, and also follows a well established CMake method of doing things. |
(0041647) Kitware Robot (administrator) 2016-06-10 14:27 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-01-29 03:51 | Marcel Loose | New Issue | |
2010-08-31 16:59 | David Cole | Note Added: 0022040 | |
2010-09-13 09:03 | Marcel Loose | Assigned To | => Marcel Loose |
2010-09-13 09:03 | Marcel Loose | Status | new => assigned |
2010-09-13 10:51 | Marcel Loose | Note Added: 0022210 | |
2010-09-13 11:10 | David Cole | Note Added: 0022212 | |
2010-09-28 09:04 | Marcel Loose | Note Added: 0022371 | |
2010-09-28 10:29 | David Cole | Note Added: 0022372 | |
2011-04-20 06:36 | Johannes Wienke | File Added: SubversionIsWc.cmake | |
2011-04-20 06:37 | Johannes Wienke | Note Added: 0026231 | |
2011-04-20 07:12 | Marcel Loose | Note Added: 0026232 | |
2011-06-24 12:41 | Aaron C. Meadows | Note Added: 0026965 | |
2011-06-24 14:53 | Aaron C. Meadows | Tag Attached: FindSubversion | |
2012-08-28 06:05 | Marcel Loose | Status | assigned => backlog |
2016-06-10 14:27 | Kitware Robot | Note Added: 0041647 | |
2016-06-10 14:27 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |