subversion

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

subversion

Andreas Naumann
Dear cmake users,

I have a question if, and how, you use the Subversion module of cmake.
The module provides the macro Subversion_WC_INFO, which extracts
information of a working copy. I use this information, to generate a sub
minor revision number of my project.
If I checkout my project using svn, it works. But if I export it, the
modules failes with a fatal error.
At the moment, I check, if my directory is a working copy and if it is
not, the version variable is not defined. In my oppinion, it would be
better, if the macro from the subversion module would simply define a
variable "is_working_directory" instead of failing hard.
What do you think about this idea? How do you use the subversion module?
The patch would be easy, and I would send one to the developer mailing
list, if desired.

Regards,
Andreas
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: subversion

Marcel Loose-2
Hi Andreas,

I think the FindSubversion module predates CMake 2.8, which introduced
"message(WARNING ...)". I think a warning would be better than an error
in this case; and I think the same argument holds for Subversion_WC_LOG,
which also generates an error if invoked from a non-working copy.

Cheers,
Marcel Loose.

Op 24-06-16 om 19:48 schreef Andreas Naumann:

> Dear cmake users,
>
> I have a question if, and how, you use the Subversion module of cmake.
> The module provides the macro Subversion_WC_INFO, which extracts
> information of a working copy. I use this information, to generate a sub
> minor revision number of my project.
> If I checkout my project using svn, it works. But if I export it, the
> modules failes with a fatal error.
> At the moment, I check, if my directory is a working copy and if it is
> not, the version variable is not defined. In my oppinion, it would be
> better, if the macro from the subversion module would simply define a
> variable "is_working_directory" instead of failing hard.
> What do you think about this idea? How do you use the subversion module?
> The patch would be easy, and I would send one to the developer mailing
> list, if desired.
>
> Regards,
> Andreas


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: subversion

Nagger
In reply to this post by Andreas Naumann
Am 24.06.2016 um 19:48 schrieb Andreas Naumann:

> At the moment, I check, if my directory is a working copy and if it is
> not, the version variable is not defined. In my oppinion, it would be
> better, if the macro from the subversion module would simply define a
> variable "is_working_directory" instead of failing hard.

See https://cmake.org/pipermail/cmake/2010-January/034862.html


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: subversion

Andreas Naumann
Thanks for the 6 year old hint. But obviously, the patch is not in any recent cmake version.
Therefore, I could use it in my own project and ship my own FindSubversion.cmake.. which is quite ugly.
 
Gesendet: Montag, 27. Juni 2016 um 03:11 Uhr
Von: Nagger <[hidden email]>
An: [hidden email]
Betreff: Re: [CMake] subversion
Am 24.06.2016 um 19:48 schrieb Andreas Naumann:

> At the moment, I check, if my directory is a working copy and if it is
> not, the version variable is not defined. In my oppinion, it would be
> better, if the macro from the subversion module would simply define a
> variable "is_working_directory" instead of failing hard.

See https://cmake.org/pipermail/cmake/2010-January/034862.html


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: subversion

Marcel Loose

See also https://cmake.org/Bug/view.php?id=10200

Cheers,
Marcel Loose.


On 27/06/16 09:23, Andreas Naumann wrote:
Thanks for the 6 year old hint. But obviously, the patch is not in any recent cmake version.
Therefore, I could use it in my own project and ship my own FindSubversion.cmake.. which is quite ugly.
 
Gesendet: Montag, 27. Juni 2016 um 03:11 Uhr
Von: Nagger [hidden email]
An: [hidden email]
Betreff: Re: [CMake] subversion
Am 24.06.2016 um 19:48 schrieb Andreas Naumann:

> At the moment, I check, if my directory is a working copy and if it is
> not, the version variable is not defined. In my oppinion, it would be
> better, if the macro from the subversion module would simply define a
> variable "is_working_directory" instead of failing hard.

See https://cmake.org/pipermail/cmake/2010-January/034862.html


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake




--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

loose.vcf (304 bytes) Download Attachment
signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: subversion

Andreas Naumann
The discussion is interesting and ends with the question, whether the
macro "Subversion_IS_WC" is usable. As I understand the other arguments are
     *leave the FATAL_ERROR as default for backwards compatibility
     *the suggested patch hides the error message if error_quite is set .
     *calling svn info twice is felt to be a waste, if the result is
desired anyway.

So, I would suggest to extend Erik Johanssons patch from
http://www.mail-archive.com/cmake@.../msg26817.html by storingto  
the error message and svn error code in an extra variable.
Than, we have the ability to ignore errors due to "wrong" working
directories and to analyze the error, if the user is interested in the
error.
In my opinion, a hard fail is annoying, because the user is not able to
recover from the error.

Regards,
Andreas

Am 27.06.2016 um 12:57 schrieb Marcel Loose:

>
> See also https://cmake.org/Bug/view.php?id=10200
>
> Cheers,
> Marcel Loose.
>
>
> On 27/06/16 09:23, Andreas Naumann wrote:
>> Thanks for the 6 year old hint. But obviously, the patch is not in
>> any recent cmake version.
>> Therefore, I could use it in my own project and ship my own
>> FindSubversion.cmake.. which is quite ugly.
>> *Gesendet:* Montag, 27. Juni 2016 um 03:11 Uhr
>> *Von:* Nagger <[hidden email]>
>> *An:* [hidden email]
>> *Betreff:* Re: [CMake] subversion
>> Am 24.06.2016 um 19:48 schrieb Andreas Naumann:
>>
>> > At the moment, I check, if my directory is a working copy and if it is
>> > not, the version variable is not defined. In my oppinion, it would be
>> > better, if the macro from the subversion module would simply define a
>> > variable "is_working_directory" instead of failing hard.
>>
>> See https://cmake.org/pipermail/cmake/2010-January/034862.html
>>
>>
>> --
>>
>> Powered by www.kitware.com <http://www.kitware.com>
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For
>> more information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>>
>>
>
>
>

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake