Re: Shelving v1 -- move to trunk?

19 views
Skip to first unread message

Julian Foad

unread,
Nov 16, 2017, 3:27:50 PM11/16/17
to d...@subversion.apache.org, tortois...@googlegroups.com
(To Subversion and TortoiseSVN lists.)

Subversion change r1815293 marks the shelving APIs with
SVN_EXPERIMENTAL. In TortoiseSVN this translates to
__declspec(deprecated("experimental function used")) which raises an
error when the functions are called from SVN.cpp.

The basic way to work around this, as used in Subversion r1815294 in
shelve-cmd.c and shelve.c, is to #define SVN_EXPERIMENTAL as nothing
before including Subversion header files.

In TortoiseSVN's, the Subversion headers are included not directly in
each file (e.g. SVN.cpp) but from inside the pre-compiled header stdafx.x.

I would have preferred to put '#define SVN_EXPERIMENTAL' just in SVN.cpp
which is the only file that calls the experimental functions. Putting
the #define directly in SVN.cpp, before #include stdafx.h, does NOT
work, even if followed by including svn_types.h and svn_client.h. The
compiler throws a warning about it and ignores it and still uses the
declarations from the precompiled header and so raises the same errors
in the end.

It looks like I need to put '#define SVN_EXPERIMENTAL' inside stdafx.h
(just before the Subversion includes).

If I do, it then builds OK.

Is that OK?

- Julian

Stefan

unread,
Nov 16, 2017, 5:24:03 PM11/16/17
to TortoiseSVN-dev
Or, change the build script and add the define there. Either directly:
<define name="SVN_EXPERIMENTAL" />
or via a NAnt target and property:

  <target name="experimental">
    <description>
      builds svn experimental features
    </description>
    <property name="experimental" value="true" />
  </target>
and then
<define name="SVN_EXPERIMENTAL" if="${experimental==true}"/>

but defining it directly in stdafx.h is ok as well.

Stefan
Reply all
Reply to author
Forward
0 new messages