Posts

How to enable convert extension into Mercurial ?

Image
Advanced users of Mercurial can be aided with the use of Mercurial extensions. Extensions allow the integration of powerful new features directly into the Mercurial core.    Built-in help on extensions is available with ' hg help extensions '. To get help about an enabled extension, run ' hg help <extension-name> '. Convert Extension The Convert extension converts repositories from other SCMs (or even Mercurial itself) into Mercurial repositories, with options for filtering and renaming. It can also be used to filter Mercurial repositories to get subsets of an existing one. The current release supports the following repository types as sources: CVS Subversion Git Darcs Monotone Bazaar GNU Arch Mercurial Perforce Convert extension comes up together with Mercurial. To enable convert extension, add following lines in your configuration file, Edit your $ HOME/.hgrc which look ...

Basic commands of Mercurial

These commands are very much to the subversion. 1. Creating a repository (hg init)   Create a mercurial repository in an empty directory by using the init command: [root@localhost ~]# mkdir Test [root@localhost ~]# cd Test [root@localhost Test]# hg init [root@localhost Test]# ls -lar total 12 drwxr-xr-x. 3 root root 4096 May 21 06:42 .hg dr-xr-x---. 36 root root 4096 May 21 06:40 .. drwxr-xr-x. 3 root root 4096 May 21 06:42 . Now there is an empty repository created, locally in your directory. The repository contains both a working copy, and the repository data (the history information). 2. Adding a file (hg add) Schedule a file for addition [root@localhost Test]# echo "Testing1" >>test.txt [root@localhost Test]# ls -lar total 16 -rw-r--r--. 1 root root 9 May 21 06:47 test.txt drwxr-xr-x. 3 root root 4096 May 21 06:42 .hg dr-xr-x---. 36 root root 4096 May 21 06:40 .. drwxr-xr-x. 3 root root ...

Installation and configuration of Mercurial

Image
Installation Windows : The best version of Mercurial for Windows is TortoiseHg, which can be found at http://tortoisehg.bitbucket.org/ . This package has no external dependencies. It “just works.” It provides both command-line and graphical user interfaces. After installation, you will have a right-click menu in Windows Explorer that gives you access to the graphical tools. After logging out and in again, you will also have a hg and a thg program available in a Command Prompt. You can use the thg program to start the graphical TortoiseHg tools. Command-line : (figure 1) GUI : (figure2) Linux : You can install Mercurial on Linux using package manager - yum install *mercurial* but installing it from package manager not assure you the latest version of mercurial. So, You can install the latest version(2.6) from source http://mercurial.selenic.com/release , unpack it and run make install to install it. If you get any issue...

What is Mercurial ?

Mercurial is a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects. It is mainly implemented using the Python programming language. It is supported on Windows and Unix-like systems, such as Mac OS X and Linux. All of Mercurial's operations are invoked as arguments to its driver program hg, a reference to the chemical symbol of the element mercury. Mercurial's major design goals include high performance and scalability, decentralized, fully distributed collaborative development, robust handling of both plain text and binary files, and advanced branching and merging capabilities, while remaining conceptually simple.  How you can benefit from Mercurial It is fast and powerful, It efficiently handles projects of any size and kind. Every clone contains the whole project history, so most actions are local, fast and convenient. Mercurial supports a multitude of workflows and you can easily enhance its fun...

How to read certificates using CertificateFactory class

In my previous blog , I have explained how can you create self signed certificate using bouncy castle API and how to import it into keystore. This tutorial will explain how to read existing certificate file using java.security.cert.CertificateFactory class. import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.CertificateFactory; /**  * Reads the certificate and import into Java keystore.  *  * @author abdul  *  */ public class ReadCertificateFile {      /**      * @param args      * @throws Exception      */     public static void main(String[] args) throws Exception {         ReadCertificateFile readCertificateFile = new ReadCertificateFile();   ...

Eclipse - Tips & Tricks

This article is for those who use Eclipse. Keyboards shortcuts are very important for comfortable and quick editing. Here are the list of most important shortcuts in Eclipse : For a full list of shortcuts, you can also check by pressing Ctrl+Shift+L. Ctrl +3 Focus into the Quick Access search box which allows you to execute any Eclipse command. Ctrl+SHIFT+T Search dialog for Java Type, Start typing the name and the list gets smaller. Try typing the capital letters of the class only (e.g. type "NPE" to find "NullPointerException") Ctrl+SHIFT+R Search dialog for resources, e.g. Xml files, text files, or files of any other type. Ctrl+E Open Editor Drop down, Presents a popup window listing currently opened files. Ctrl+O Quick Outline, Show all methods of the current class, Press Ctrl+O a second time to include inherited methods. Ctrl+SHIFT+space Context Information Ctrl+Shift+O Organize Imports, Adjusts the imports ...