Changes

Jump to: navigation, search

Mercurial-nexj

3,077 bytes added, 15:36, 22 January 2011
no edit summary
[[Category:NexJ_Express_Continuous_Integration]]
 
<big><big> Continuous Integration Project - Mercurial</big></big>
{{NexJ_Express Index}}
==Introductions & Tutorials==
: Main website @ http://mercurial.selenic.com/
: Understanding Mercurial @ http://mercurial.selenic.com/wiki/UnderstandingMercurial
: Tutorial-wiki @ http://mercurial.selenic.com/wiki/Tutorial
: Good [http://stevelosh.com/blog/ Blog] about Mercurial
==Installation==
: Installing in windows[http://www.codza.com/mercurial-with-ssh-setup-on-windows]
: More about installation [http://www.aventinesolutions.nl/mediawiki/index.php/Quick_Tip:_Getting_Started_with_Mercurial]
: To be able to run Mercurial in Cygwin, execute hgtk.exe in TortoiseHG root.
: Cloning in Eclipse using ssh [http://youarepeople.blogspot.com/2008/10/mercurial-eclipse-over-ssh.html]
==Mercurial on Eclipse==
: Eclipse-Mercurial Video [http://blogs.intland.com/main/entry/39]-[http://code.google.com/p/hgeclipse-demo/ Demo]
: Documentation for Eclipse-Mercurial [http://bitbucket.org/mercurialeclipse/main/wiki/Documentation]
: Cloning a repo in Eclipse using SSH [http://youarepeople.blogspot.com/2008/10/mercurial-eclipse-over-ssh.html]
==Notes==
:8- mq tutorial [http://mercurial.selenic.com/wiki/MqTutorial]
:9- ant task for hg [http://ant4hg.free.fr/specifications.html#functionality-init ANT4HG]
==Challenges==* 1- First challenge is how to trim history of Clone a remote repository: <code> hg clone http://domain:port/postgreSQL NexJExpress/work/ws</code> * Branch & Merge [http://mercurial.selenic.com/wiki/Branch]: We have a Mercurial repository called A. We want to clone repo A and To create a new repo called B.branch: <code> hg branch ws</code>: ItThen commit it: <code> hg ci -m 'added branch ws's possible </code>: To see all branches: <code> hg branches</code>: To switch between branches: <code> hg update ws </code>: To clone a branch to use 'init' and create local directory: <code> hg clone -b ws work workCopy/work</code>: After commit a new repo and change to the copy of code, just copy the files from repo A and add them.push it <code> hg push</code>, it will be pushed to ws branch in main repository: In main repository if you want to merge these 2 branches first see how many heads you have <code> hg heads </code>: This way Then merge with the revision number will reset. And we will start repo B from the tip of the repo A.branch you want to merge with: <code> hg merge -r 3 </code>: The problem appears if we want Don't forget to clone just commit this merge!:'''Tips''':-''To create a branch in the tip of working directory and then pushed it to the main remote repo A :'':: <code> hg branch ws </code>:: <code > hg ci -m 'created a new branch' </code>:: <code> hg push --new-branch </code>* Webserver: :To start a web server of a specific repository, do: <code> hg serve --port 8000 </code> and keep open the same revision domain name with port number of in a browser, or right click on the 'tip'folder and use TortoiseHg Web Server option.* Templates: Here are some links that we went through, but no success yet. :using [http://mercurialhgbook.selenicred-bean.com/wikiread/EditingHistory Trimming Historycustomizing-the-output-of-mercurial.html templates]for getting customized output * Remote Repository:[to Clone a remote repository:<source lang=java>hg clone http://wwwdomain:port/postgreSQL NexJExpress/work/ws//or use sshhg clone ssh://domain/mercurial/postgreSQL // hard links was used to create a link to the main repo located at domain -D:\mercurial\postgreSQL</source>:'''possible Errors''':-''I get an error while cloning a remote repository via ssh'':If your remote repository is cloned thusly:And, you find that after successful ssh authentication you get the error message remote: abort: repository path/to/repo not found! , then you need to know the following:::Mercurial's remote repository syntax differs from syntax of other well known programs such as rsync, cvs - both of which use a : character to delimit USER@REMOTE from the path component (/path/to/repo).selenic::The path to the remote repository is relative to $HOME of USER. i.e.com, it is ~USER/path/mercurialto/hgrcrepo .5::Remember to use hg -v clone ssh://USER@REMOTE/path/to/repo and observe the remote command being executed via the ssh channel :On the other hand, if the error message is remote: bash: line 1: hg: command not found, the problem is that the environment used by ssh does not have hg in its PATH.html There are two ways to deal with this problem:::In your ~/.hgrc file, set a remotecmd value in the [ui]section giving the exact path to hg.:[http:On the server, create a ~/.ssh/environment file that defines an appropriate PATH, and add PermitUserEnvironment yes to /mercurialetc/sshd_config.selenic:-''I get an "ssl required" error message when trying to push changes'':That's because allowing anonymous, unauthenticated HTTP clients to push changes into your repository would be a huge security hole.comIf you are on a private network and you know that all HTTP clients are trustworthy, you can add<source lang=java>[web]push_ssl = false</wikisource>to .hg/TipsAndTricks mq strip changeset]:hgrc on the server-side repository. (See also [http://mercurial.selenic.com/wiki/EditingHistory Editing History!!HgWebDirStepByStep HgWebDirStepByStep].)There's a reason for requiring SSL, however. If you do not trust the network you are using do not change this.
1
edit

Navigation menu