SVN : Utility commands
List of SVN utility commands that I needed to use frequently apart from commit and update. Feel free to add to the list
- Know SVN binary path
which svn
- Know SVN server version installed
svnadmin --version
- Know SVN Client server version installed
svn --version
- Create SVN Respository
svnadmin create path/to/repository/reponame
You can then assign permissions to reponame directory like you do on any other directory - Upgrade SVN Respository version
svnadmin upgrade path/to/repository
Related posts
C# Word Automation: Solve “The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)”
Assignment:
Export data in word 2003 format using COM Interop
Problem:
First time export worked just fine. Second time, I received exception “The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)” for “Microsoft.Office.Interop.Word”
Solution:
public class CDocumentExporter
{
static ApplicationClass _word_application;
public static ApplicationClass AppClass
{
get
{
if (_word_application == null)
{
_word_application = new ApplicationClass();
_word_application.ApplicationEvents2_Event_Quit += new ApplicationEvents2_QuitEventHandler(_word_application_ApplicationEvents2_Event_Quit);
}
return _word_application;
}
}
static void _word_application_ApplicationEvents2_Event_Quit()
{
_word_application = null;
}
}//end of class
And just use the CDocumentExporter.AppClass wherever necessary
Important information
You need to add a COM reference to your favorite word object library which should in turn add
- Microsoft.Office.Core
- VBIDE
- Word
If you do not see these added, make sure you have PIAs for office version installed on your machine.
Get Office 2007 PIAs here
Get Office 2003 PIAs here
Related Posts
C# Word Automation: Inserting Images
I was looking for a way to insert images at a bookmark in a word document and thought should document these for future reference
CImage class Definition
public class CImage
{
public string Path
{
get;
set;
}
public decimal Id
{
get;
set;
}
public string Title
{
get;
set;
}
public Image Bitmap
{
get;
set;
}
public bool BusyLoading
{
get;
set;
}
public void GetImage()
{
try
{
BusyLoading = true;
WebRequest req = WebRequest.Create(Path);
WebResponse response = req.GetResponse();
Stream stream = response.GetResponseStream();
Bitmap = Image.FromStream(stream);
stream.Close();
}
catch
{
Bitmap = null;
}
finally
{
BusyLoading = false;
}
}
}
Scenario 1:
You have a path of the image file which is to be inserted
public static void SetBookMark(Document p_objWordDocument, string p_strName,
CImage p_objImage)
{
if (p_objWordDocument.Bookmarks.Exists(p_strName))
{
object objBookMark = p_strName;
p_objWordDocument.Bookmarks.get_Item(ref objBookMark).Range.InlineShapes.AddPicture(p_objImage.Path, ... dozons of object params ...);
}
}
Scenario 2:
When you have the bitmap in memory
public static void SetBookMark(Document p_objWordDocument, string p_strName,
CImage p_objImage)
{
if (p_objWordDocument.Bookmarks.Exists(p_strName))
{
object objBookMark = p_strName;
Clipboard.SetDataObject(p_objImage.Bitmap);
p_objWordDocument.Bookmarks.get_Item(ref objBookMark).Range.Paste();
}
}
Important information
You need to add a COM reference to your favorite word object library which should in turn add
- Microsoft.Office.Core
- VBIDE
- Word
If you do not see these added, make sure you have PIAs for office version installed on your machine.
Get Office 2007 PIAs here
Get Office 2003 PIAs here
Related Posts
Brain munch: Money
Money is a toy introduced by mankind for mankind to be engaged for lifetime.
IIS: How to map a domain name to a web site
This post explains how to map domain names with IIS web site
Assumptions:
- We have IIS hosted on a server with static IP and internet access (:|)
- We own a public domain name (:|) which is to be mapped (:|)
For demo, I am assuming following values
- server IP address : 222.222.222.222
- public domain name to be mapped: map.jyotsna.com
Please note that these values are for demostration purpose only. I, in no way, own these.
To do: For IIS version 7
- Add and ‘A’ record to your DNS settings with value = IP of server. So my “A” record for jyotsna.com has value = 222.222.222.222
- Create a web site in IIS – if needed. For demostration, I am going to use “Default Web Site”
- Select the web site and choose bindings in Actions pane.
- In the Site Bindings dialog box, select the binding for which you want to add a host header and then click Edit or click Add to add a new binding with a host header.
- In the Host name box, type a host header for the site, which in my case is map.jyotsna.com
- Click on OK/ Apply to close all windows. There is NO NEED to restart IIS to reflect the changes.
To do: For IIS version 5.1 till 6
- Add and ‘A’ record to your DNS settings with value = IP of server. So my “A” record for jyotsna.com has value = 222.222.222.222
- Create a web site in IIS – if needed. For demostration, I am going to use “Default Web Site”
- Right click the concerned web site -> properties. In the “Web Site” tab, click on “Advanced” button.

- In “Multiple identities for this Web Site” section, click “Add” button.

- You now need to mention three values

- IP Address – this is IP address of the server. In my case it will be 222.222.222.222
- TCP port – I want this website to be available on map.jyotsna.com irrespective of the actual IIS port assigned to “Default web site”. Hence I am going to specify 80. If I wanted the site to be available on map.jyotsna.com:666, I would have specified 666 as this value.
- Host Header Name – map.jyotsna.com
- Click on OK/ Apply to close all windows. There is NO NEED to restart IIS to reflect the changes.
Related articles:
tortoise SVN: Copy a SVN bound directory to another repository
Task at hand:
Copy a directory from within one SVN repository to another
Assumptions:
- Tortoise SVN as SVN client
- The two SVN repositories – being copied from and being copied to already exist
Steps:
1. Right click SVN bound directory that you with to copy. Choose tortoise SVN -> Export.
2. Specify path to an empty folder e.g. “c:\to_add”. Click on OK.
3. Now you have the SVN bound directory contents in this new directory “to_add”.
4. Right click on “to_add” and choose tortoise svn -> add
5. Specify path to the new repository and location inside it.
6. Right click on “to_add” and choose SVN Commit to make your changes permanent.
Voila !! You are done.
Brain munch: Crowd
Crowd is gathering of people who think feeling lonely with other people is better than feeling lonely alone !

