Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. actual Subversion Revision [modified]

actual Subversion Revision [modified]

Scheduled Pinned Locked Moved C#
asp-nethelp
4 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    Martin 0
    wrote on last edited by
    #1

    Hello, I have my VS2003 Project under Subversion control and wanted to find out (per code) which revision number has my project. I tried: NSvn.Core.Revision rev = NSvn.Core.Revision.Head; NSvn.Core.ClientConfig clientcfg = new ClientConfig(); NSvn.Core.Client client = new Client(mypath); I also looked into: NSvn.Common No luck so far (also google hasn't helped me this time.) Thanks for your time and help! All the best, Martin -- modified at 9:44 Tuesday 9th January, 2007

    D 1 Reply Last reply
    0
    • M Martin 0

      Hello, I have my VS2003 Project under Subversion control and wanted to find out (per code) which revision number has my project. I tried: NSvn.Core.Revision rev = NSvn.Core.Revision.Head; NSvn.Core.ClientConfig clientcfg = new ClientConfig(); NSvn.Core.Client client = new Client(mypath); I also looked into: NSvn.Common No luck so far (also google hasn't helped me this time.) Thanks for your time and help! All the best, Martin -- modified at 9:44 Tuesday 9th January, 2007

      D Offline
      D Offline
      Daniel Grunwald
      wrote on last edited by
      #2

      Here's how to get the BASE revision (the revision a working copy contains) - I use this to generate the version number for the AssemblyInfo file in the pre-build-task:

      Client client = new Client();
      int revision = client.SingleStatus(workingDirectory).Entry.Revision;

      This operation does not contact the server, it simply looks at the .svn folder. Getting the HEAD revision might work similar (but you have to contact the repository), try to get the status of the repository URL.

      M 2 Replies Last reply
      0
      • D Daniel Grunwald

        Here's how to get the BASE revision (the revision a working copy contains) - I use this to generate the version number for the AssemblyInfo file in the pre-build-task:

        Client client = new Client();
        int revision = client.SingleStatus(workingDirectory).Entry.Revision;

        This operation does not contact the server, it simply looks at the .svn folder. Getting the HEAD revision might work similar (but you have to contact the repository), try to get the status of the repository URL.

        M Offline
        M Offline
        Martin 0
        wrote on last edited by
        #3

        Hallo Daniel, Thank you very much for your answer! I think this is exactly what I needed! I will test it soon. Thanks again! All the best, Martin

        1 Reply Last reply
        0
        • D Daniel Grunwald

          Here's how to get the BASE revision (the revision a working copy contains) - I use this to generate the version number for the AssemblyInfo file in the pre-build-task:

          Client client = new Client();
          int revision = client.SingleStatus(workingDirectory).Entry.Revision;

          This operation does not contact the server, it simply looks at the .svn folder. Getting the HEAD revision might work similar (but you have to contact the repository), try to get the status of the repository URL.

          M Offline
          M Offline
          Martin 0
          wrote on last edited by
          #4

          Hallo Daniel, Just tested your code sample, and I'm happy now. Thanks again! Martin

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups