Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. How can I connect to Visual SVN server Repository C++ with Qt
Forum Updated to NodeBB v4.3 + New Features

How can I connect to Visual SVN server Repository C++ with Qt

Scheduled Pinned Locked Moved Unsolved Brainstorm
6 Posts 3 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    es11
    wrote on 25 Jun 2019, 08:28 last edited by
    #1

    I just want to access local visual svn server repositories with my C++ QT code.
    I want to display the folder and subfolder names in the following adress https://desktop/!/#repo (address of local svn repository).

    Thanks for your help.

    J 1 Reply Last reply 26 Jun 2019, 08:05
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Jun 2019, 20:21 last edited by SGaist
      #2

      Hi and welcome to devnet,

      How are you querying that server for information ?
      Does it provide an API to access such information ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply 27 Jun 2019, 06:07
      0
      • E es11
        25 Jun 2019, 08:28

        I just want to access local visual svn server repositories with my C++ QT code.
        I want to display the folder and subfolder names in the following adress https://desktop/!/#repo (address of local svn repository).

        Thanks for your help.

        J Offline
        J Offline
        JonB
        wrote on 26 Jun 2019, 08:05 last edited by
        #3

        @es11
        It's years since I wrote an SVN interface in a C# project, but.... SVN servers (including Visual SVN Server) act as a DAV server. You send it requests over HTTP using method names like REPORT or PROPFIND. Your request input body is XML, in a certain format with various property specifications, and it sends you back an XML payload with response in similar-ish format. From Qt you will use QNetworkAccessManager classes to do HTTP requests/responses.

        To give you some idea of what it looks like, here's C# code for the simplest request/response, just asking for the server's OPTIONS:

            private XmlDocument SVNDavOptions(string url)
            {
              // Issue a *server*-side "OPTIONS" query against a SVN DAV Server
              // to test it works OK
        
              ICWebClient icwc = new ICWebClient();
              SetSVNDavWebClientCredentials(icwc);
        
              string query =
        	"<D:options " + SVNDavNamespacesDeclaration + ">" +
        	"<D:activity-collection-set/>" +
        	"</D:options>";
        
              XmlDocument xmlResponse = icwc.HttpDavMethod("OPTIONS", null, url, query);
              return xmlResponse;
            }
        

        Unfortunately, I no longer have any recollection where the SVN DAV protocol is explained. You'll have to Google. I come across e.g. https://svn.apache.org/repos/asf/subversion/trunk/notes/http-and-webdav/webdav-protocol or https://tools.ietf.org/html/rfc2518. These are the sort of documentation I used to create client code against.

        1 Reply Last reply
        2
        • S SGaist
          25 Jun 2019, 20:21

          Hi and welcome to devnet,

          How are you querying that server for information ?
          Does it provide an API to access such information ?

          E Offline
          E Offline
          es11
          wrote on 27 Jun 2019, 06:07 last edited by
          #4

          @SGaist
          I think I need a library for that. I found the java version which is SVNKit. However, I couldn't find for C++ Qt version. This is the code for java with a library: https://wiki.svnkit.com/Printing_Out_A_Subversion_Repository_Tree
          this is what I tried to do with QT but I don't have any library for connection to the server.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 28 Jun 2019, 05:54 last edited by
            #5

            One thing: there's no C++ Qt version. Qt is a C++ toolkit, not a variant of the language.

            Subversion already provides an API for you to use: http://subversion.apache.org/docs/api/latest/index.html.

            By the way, Qt Creator has a SVN client somewhere since it's listed as a supported VCS systems. You might want to take a look at it.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • E Offline
              E Offline
              es11
              wrote on 30 Jun 2019, 07:42 last edited by
              #6

              I downloaded subversion however I couldn't integrate with my code. Should I add all the header files to my project? I am very new to C ++ programming sorry and thanks for help .

              1 Reply Last reply
              0

              6/6

              30 Jun 2019, 07:42

              • Login

              • Login or register to search.
              6 out of 6
              • First post
                6/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved