Difference between revisions of "User:Minooz/Mercurial"

From CDOT Wiki
Jump to: navigation, search
(Continuous Integration System)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Mercurial Project=
+
=Mercurial Help=
==Mercurial==
+
==Introductions & Tutorials==
 
: Main website @ http://mercurial.selenic.com/  
 
: Main website @ http://mercurial.selenic.com/  
 
: Mozilla Mercurial @ https://wiki.mozilla.org/Mercurial_on_Windows
 
: Mozilla Mercurial @ https://wiki.mozilla.org/Mercurial_on_Windows
Line 7: Line 7:
 
: Tutorial-wiki @ http://mercurial.selenic.com/wiki/Tutorial
 
: Tutorial-wiki @ http://mercurial.selenic.com/wiki/Tutorial
  
===Installation===
+
==Installation==
 
: Installing in windows[http://www.codza.com/mercurial-with-ssh-setup-on-windows]
 
: 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]
 
: More about installation [http://www.aventinesolutions.nl/mediawiki/index.php/Quick_Tip:_Getting_Started_with_Mercurial]
  
===Mercurial on Eclipse===
+
==Mercurial on Eclipse==
 
: Eclipse-Mercurial [http://www.javaforge.com/wiki/76412]
 
: Eclipse-Mercurial [http://www.javaforge.com/wiki/76412]
 
: Eclipse-Mercurial Video [http://blogs.intland.com/main/entry/39]-[http://code.google.com/p/hgeclipse-demo/ Demo]
 
: 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]
 
: Documentation for Eclipse-Mercurial [http://bitbucket.org/mercurialeclipse/main/wiki/Documentation]
  
===[[ User:Minooz/Mercurial/notes | Notes]]===
+
==Notes==
 +
: The Definitive Guide, is a documentation for hg ([http://matrix.senecac.on.ca/~mziaei1/CDOT/hgbook.pdf PDF] or [http://hgbook.red-bean.com/read/ Html]).
 +
: TortoiseHg Documentation [http://matrix.senecac.on.ca/~mziaei1/CDOT/TortoiseHg.pdf ]
 +
: Creating a Version Control Repository [http://wiki.secondlife.com/wiki/Creating_a_version_control_repository]
 +
: Mozilla Mercurial [https://developer.mozilla.org/en/Mercurial_FAQ]
  
===Challenges===
+
*Some Basic Terms (from [http://matrix.senecac.on.ca/~mziaei1/CDOT/hgbook.pdf  The Definitive Guide])
 +
: 1- The .hg directory is the “real” repository, and all of the files and directories that coexist with it are said to live in the ''working directory''.
 +
::An easy way to remember the distinction is that the ''repository'' contains the history of your project, while the ''working directory'' contains a snapshot of your project at a particular point in history.
 +
: 2- The ''hg log'' command gives us a view of the history of changes in the repository. By default, this command prints a brief paragraph of output for each change to the project that was recorded.
 +
:: Each of these recorded events are called a ''changeset'', because it can contain a record of changes to several files. ''Changeset'' is also referred to as''change'', ''cset'',''revision'' or ''rev''.
 +
: 3- ''Changeset'' field has the format of a number (''identifier'', which is only valid in that repository) followed by a colon, followed by a hexadecimal (or hex) string. These are identifiers for the changeset.
 +
::The hex string is a unique identifier: the same hex string will always refer to the same changeset in every copy of this repository. The number is shorter and easier to type than the hex string, but it isn't unique: the same number in two different clones of a repository may identify different changesets. ''changeset: 0:0a04b987be5a''
 +
:4- Mercurial uses revision numbers purely as a convenient shorthand. If you need to discuss a changeset with someone, or make a record of a changeset for some other reason (for example, in a bug report), use the hexadecimal identifier.
 +
:5- Some changesets, have a tag field. A ''tag'' is another way to identify a changeset, by giving it an easy-to-remember name. ''tag: tip''
 +
:6- To get the changeset id of the tipmost changeset of a remote repository you can do: When it changes, you have new changesets in the remote repository.[http://mercurial.selenic.com/wiki/FAQ#FAQ.2BAC8-CommonProblems.How_can_I_find_out_if_there_are_new_changesets_in_a_remote_repository.3F]
 +
<source lang=perl>
 +
> hg id -i -r tip http://www.selenic.com/repo/hello
 +
[[[link-to-a-page]]]
 +
[url=http://example.com]Example[/url]
 +
82e55d328c8c
 +
</source>
 +
:7- Some aliases:
 +
::st = status / ci = commit /
 +
: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 a repository.
 
* 1- First challenge is how to trim history of a repository.
 
: We have a Mercurial repository called A. We want to clone repo A and create a new repo called B.
 
: We have a Mercurial repository called A. We want to clone repo A and create a new repo called B.
Line 29: Line 53:
 
:[http://mercurial.selenic.com/wiki/TipsAndTricks mq strip changeset]
 
:[http://mercurial.selenic.com/wiki/TipsAndTricks mq strip changeset]
 
:[http://mercurial.selenic.com/wiki/EditingHistory Editing History!!]
 
:[http://mercurial.selenic.com/wiki/EditingHistory Editing History!!]
 
==Continuous Integration System==
 
: [http://confluence.public.thoughtworks.org/display/CC/CI+Feature+Matrix CI Feature Matrix]
 
 
*'''Hudosn'''
 
:[http://hudson-ci.org/ Hudson]
 
:[http://blogs.sun.com/glassfishpodcast/entry/episode_007_interview_with_kohsuke Interview with kosuke]
 
:[http://wiki.hudson-ci.org/display/HUDSON/Meet+Hudson Meet+Hudson]
 
:Steps to how to use Hudson
 
:1- Installation
 
::[http://wiki.hudson-ci.org/display/HUDSON/Installing+Hudson+as+a+Windows+service Installation on Windows]
 
::Hudson became self executable[http://weblogs.java.net/blog/kohsuke/archive/2007/02/hudson_became_s.html]
 
::[http://www.youtube.com/watch?v=6k0S4O2PnTc&feature=player_embedded Video Kosuke] With slides @http://marakana.com/forums/java/general/79.html
 
::How to use post build scripts with Hudson using regex in log text[http://wiki.hudson-ci.org/display/HUDSON/Post+build+task]
 
: 2- Plugins
 
::[http://wiki.hudson-ci.org/display/HUDSON/Mercurial+Plugin Mercurial Plugin]
 
::[http://braindump.dk/tech/2007/05/03/eclipse-plugin-for-hudson/ Eclipse Plugin]
 
::[http://deadlock.netbeans.org/hudson/builds Hudson demo]
 
::[http://pip.openplans.org/ci-server-step-by-step.html How to Install plugins]
 
::[http://developer.symbian.org/wiki/index.php/Using_Hudson_for_Building Good plugin installation]
 
: 3- Start a Job
 
::[http://wiki.hudson-ci.org/display/HUDSON/Building+a+software+project Building Project]
 
*'''Apache Continuum'''
 
:http://continuum.apache.org/
 
 
*'''Cruise Control'''
 
:http://cruisecontrol.sourceforge.net/
 
:http://cruisecontrol.sourceforge.net/dashboard.html
 
:How to build, deploy, and monitor Java applications: [http://media.pragprog.com/titles/auto/scheduled.pdf Pragmatic Project Automation]
 
:[http://pragprog.com/starter_kit Pragmatic Bookshelf]
 
:[http://cruisecontrol.sourceforge.net/gettingstartedsourcedist.html Getting Started]
 
 
*'''Maven'''
 
 
*'''Anthill'''
 
 
*'''Buildbot'''
 
:The [http://buildbot.net/trac Buildbot] is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. [http://buildbot.net/buildbot/docs/current/Introduction.html#Introduction]
 
: [http://buildbot.net/buildbot/docs/current/index.html#Top Here] is the documentation for Buildbot. [https://developer.mozilla.org/presentations/buildbot-2.01.07.mov This video] also explains different features of this system.
 
:The buildmaster is usually fed Changes by some sort of version control system, which may cause builds to be run. As the builds are performed, various status messages are produced, which are then sent to any registered Status Targets.[[Image:Buildbot.png|thumb|none|widthpx|]]
 
 
:-Change Sources, which create a Change object each time something is modified in the VC repository. Most ChangeSources listen for messages from a hook script of some sort. Some sources actively poll the repository on a regular basis. All Changes are fed to the Schedulers.
 
:- Schedulers, which decide when builds should be performed. They collect Changes into BuildRequests, which are then queued for delivery to Builders until a buildslave is available.
 
:-Builders, which control exactly how each build is performed (with a series of BuildSteps, configured in a BuildFactory). Each Build is run on a single buildslave.
 
:-Status plugins, which deliver information about the build results through protocols like HTTP, mail, and IRC.
 
*Common Requirements
 
:At a bare minimum, you'll need the following for both the buildmaster and a buildslave:
 
:-Python: http://www.python.org Buildbot requires python-2.4 or later.
 
:-Twisted: http://twistedmatrix.com (Twisted is an event-driven networking engine written in Python and licensed under the MIT license.)
 
:Requirements for Buildmaster
 
:-sqlite3: http://pypi.python.org/pypi/pysqlite
 
::The sqlite3 package is required for python-2.5 and earlier (it is already included in python-2.5 and later, but the version in python-2.5 has nasty bugs)
 
:-simplejson: http://pypi.python.org/pypi/simplejson
 
::The simplejson package is required for python-2.5 and earlier (it is already included as json in python-2.6 and later)
 
:-Jinja2: http://jinja.pocoo.org/2
 
::Jinja2 is a general purpose templating language and is used by Buildbot to generate the HTML output.
 

Latest revision as of 14:07, 14 October 2010

Mercurial Help

Introductions & Tutorials

Main website @ http://mercurial.selenic.com/
Mozilla Mercurial @ https://wiki.mozilla.org/Mercurial_on_Windows
compare version controls [1]
Understanding Mercurial @ http://mercurial.selenic.com/wiki/UnderstandingMercurial
Tutorial-wiki @ http://mercurial.selenic.com/wiki/Tutorial

Installation

Installing in windows[2]
More about installation [3]

Mercurial on Eclipse

Eclipse-Mercurial [4]
Eclipse-Mercurial Video [5]-Demo
Documentation for Eclipse-Mercurial [6]

Notes

The Definitive Guide, is a documentation for hg (PDF or Html).
TortoiseHg Documentation [7]
Creating a Version Control Repository [8]
Mozilla Mercurial [9]
1- The .hg directory is the “real” repository, and all of the files and directories that coexist with it are said to live in the working directory.
An easy way to remember the distinction is that the repository contains the history of your project, while the working directory contains a snapshot of your project at a particular point in history.
2- The hg log command gives us a view of the history of changes in the repository. By default, this command prints a brief paragraph of output for each change to the project that was recorded.
Each of these recorded events are called a changeset, because it can contain a record of changes to several files. Changeset is also referred to aschange, cset,revision or rev.
3- Changeset field has the format of a number (identifier, which is only valid in that repository) followed by a colon, followed by a hexadecimal (or hex) string. These are identifiers for the changeset.
The hex string is a unique identifier: the same hex string will always refer to the same changeset in every copy of this repository. The number is shorter and easier to type than the hex string, but it isn't unique: the same number in two different clones of a repository may identify different changesets. changeset: 0:0a04b987be5a
4- Mercurial uses revision numbers purely as a convenient shorthand. If you need to discuss a changeset with someone, or make a record of a changeset for some other reason (for example, in a bug report), use the hexadecimal identifier.
5- Some changesets, have a tag field. A tag is another way to identify a changeset, by giving it an easy-to-remember name. tag: tip
6- To get the changeset id of the tipmost changeset of a remote repository you can do: When it changes, you have new changesets in the remote repository.[10]
> hg id -i -r tip http://www.selenic.com/repo/hello 
[[[link-to-a-page]]]
[url=http://example.com]Example[/url]
82e55d328c8c
7- Some aliases:
st = status / ci = commit /
8- mq tutorial [11]
9- ant task for hg ANT4HG

Challenges

  • 1- First challenge is how to trim history of a repository.
We have a Mercurial repository called A. We want to clone repo A and create a new repo called B.
It's possible to use 'init' and create a new repo and just copy the files from repo A and add them.
This way the revision number will reset. And we will start repo B from the tip of the repo A.
The problem appears if we want to clone just the tip of the repo A and keep the same revision number of the 'tip'.
Here are some links that we went through, but no success yet.
Trimming History
.hgrc file
mq strip changeset
Editing History!!