2012年3月14日 星期三

Eclipse設定SVN以及Mercurial

1. install EclipseMercurial
Update Site: http://cbes.javaforge.com/update

2. install SVN Connector:
Update Site: http://download.eclipse.org/technology/subversive/0.7/update-site/
(the site address might be duplicated)

(under Ubuntu)
1. install mercurial
>sudo apt-get install mercurial

2. install subversion
>sudo apt-get install subversion

2012年3月8日 星期四

Mercurial: push source code on bitbucket.org

1. Register an account on bitbucket.org and create a repository named sample-repo

2. yum install mercurial

3. configure https certificate authorities. create file /etc/mercurial/hgrc contain

[web]
cacerts = /etc/pki/tls/certs/ca-bundle.crt


4. enter the path of source code, initial hg repository
> cd /path/of/source
>hg init

5. create a file .hg/hgrc contain

[ui]
username = FirstName LastName 


6. add file into repository
>hg add

7. commit repository
>hg commit
edit the file to remove some HG: prefix

8. push the repository
>hg push https://your-account@bitbucket.org/your-account/sample-repo

9. Congratulation! You can browse your code on bitbucket.org now.

Reference:
http://mercurial.selenic.com/wiki/Mercurial
http://mercurial.selenic.com/wiki/CACertificates
http://mercurial.selenic.com/wiki/QuickStart