Project Description
NSubversion for .NET is simple and useful library, which give application in runtime mode, information about SVN, CVS tags used in source code, by the reflection SvnIdAttribute. Basic example. It's developed in C#, require .NET 2.0. Project written in Visual Studio 2010. It's working with Mercurial also.

Example code:

// $Id: MainForm.cs 3181 2010-10-01 00:55:55Z KAP $

using System;
using System.Windows.Forms;
using NSubversion;

namespace NSubversion.Example
{
    [SvnId("$Id: MainForm.cs 3181 2010-10-01 00:55:55Z KAP $")]
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void btnShowSnvRepositoryDialog_Click(object sender, EventArgs e)
        {
            svnDialog1.HeaderText = "List of all svn $I" + "d$ tags in current project";
            svnDialog1.ShowDialog();
        }
    }
}


Will produce:

NSubversion.Example.jpg

Warning CodePlex SubVersion repository give "unknown" at svn Author tag.

Mercurial

You can use subversion tags also in Mercurial. All all you need in .hgrc file (see http://mercurial.selenic.com/wiki/KeywordExtension):

[extensions]
hgext.keyword =
hgext.hgk =

[keyword]
** =

[keywordmaps]
Id = {file|basename},v {node|short} {date|utcdate} {author|user}

Last edited Nov 11, 2011 at 8:18 AM by KAP, version 14