<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://labviewwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AndreasS</id>
	<title>LabVIEW Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://labviewwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AndreasS"/>
	<link rel="alternate" type="text/html" href="https://labviewwiki.org/wiki/Special:Contributions/AndreasS"/>
	<updated>2026-04-25T16:15:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://labviewwiki.org/w/index.php?title=Mercurial&amp;diff=4435</id>
		<title>Mercurial</title>
		<link rel="alternate" type="text/html" href="https://labviewwiki.org/w/index.php?title=Mercurial&amp;diff=4435"/>
		<updated>2011-03-28T09:13:01Z</updated>

		<summary type="html">&lt;p&gt;AndreasS: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
{{TOCright}}[[Image:Logo.Mercurial.png|right]]&lt;br /&gt;
&lt;br /&gt;
Mercurial is a [[Source Code Control|Source Code Control]] system by Selenic, it&#039;s key feature is the distributed nature of the system. This means that changes (commits) are stored in a local repository, which can be sent (pushed) to a central repository and which can be downloaded (pulled) by others.&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
Joel Spolsky has written a How-To and Why-To page called [http://Www.hginit.com HG init] (hg is the chemical symbol for Mercury).&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
Mercurial stores it&#039;s setting in a file called &#039;hgrc&#039; inside a hidden folder &#039;.hg&#039;&lt;br /&gt;
&lt;br /&gt;
== Setting up LVMerge  ==&lt;br /&gt;
&lt;br /&gt;
[http://zone.ni.com/reference/en-XX/help/371361F-01/lvhowto/configmerge_thirdparty/ LVMerge] can be used by Mercurial as a Merge tool. Add the following text to the hgrc file:&lt;br /&gt;
&amp;lt;pre&amp;gt;[merge-tools]&lt;br /&gt;
LVMerge.args = $base $other $local $output&lt;br /&gt;
LVMerge.executable = C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe&lt;br /&gt;
LVMerge.gui = True&lt;br /&gt;
LVMerge.binary = True&lt;br /&gt;
[merge-patterns]&lt;br /&gt;
**.vi = LVMerge&lt;br /&gt;
**.ctl = LVMerge&lt;br /&gt;
**.lvclass = LVMerge&lt;br /&gt;
**.xctl = LVMerge&lt;br /&gt;
**.lvlib =LVMerge&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Setting up LVDiff ==&lt;br /&gt;
&lt;br /&gt;
[http://meta-diff.sourceforge.net/ LVDiff] is a software package that uses the built in diff-functionality from LabVIEW to do command line based LVDiffs.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
&lt;br /&gt;
First thing is to [http://meta-diff.sourceforge.net/ download] LVDiff, copy the contents of the zip-file to a location where you have writing priviliges (lvdiff uses a local ini file).&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternative: Installer from [http://decibel.ni.com/content/groups/mercurial NI Community Mercurial User Group]&lt;br /&gt;
&lt;br /&gt;
=== Adjust ===&lt;br /&gt;
&lt;br /&gt;
Then you need to open up the lvdiff.vi and implement these changes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Lvdiffcopy.png]]&lt;br /&gt;
&lt;br /&gt;
This snippet (the actual code inside lvdiff copy is shown) tests if the filenames are the same and if that&#039;s the case it calls a VI called lvdiffcopy, which creates a copy of the file2.&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
To be able to select lvdiff as the diff tool you need to add teh follwoing settings to the [merge-tools] section of the hgrc configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;lvdiff.diffargs = $child $parent&lt;br /&gt;
lvdiff.executable =C:\Program Files\lvdiff\lvdiff.exe&lt;br /&gt;
lvdiff.gui = True&lt;br /&gt;
lvdiff.binary = True&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using TortoiseHg 1.0 or later, you can add a [diff-patterns] section to your hgrc file, analogous to the merge-patterns section mentioned above. This will enable automatic selection of the visual diff tool (see [http://tortoisehg.bitbucket.org/manual/1.0/common.html#word-diffs]):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[diff-patterns]&lt;br /&gt;
**.vi = lvdiff&lt;br /&gt;
**.ctl = lvdiff&lt;br /&gt;
**.lvclass = lvdiff&lt;br /&gt;
**.xctl = lvdiff&lt;br /&gt;
**.lvlib = lvdiff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Start LVDiff ===&lt;br /&gt;
&lt;br /&gt;
You can start lvdiff in TorsoiseHg in the &#039;commit&#039; dialog with right-click and &#039;Visual Diff&#039;:&lt;br /&gt;
&lt;br /&gt;
[[Image:StartVisualDiff.png]]&lt;br /&gt;
&lt;br /&gt;
In the following dialog, select &#039;LVDiff&#039; and double click on the VI to diff:&lt;br /&gt;
&lt;br /&gt;
[[Image:HG_LVDIffStart.png]]&lt;br /&gt;
&lt;br /&gt;
After this LVdiff will launch LabVIEW and both VI (current and committed) will be compared.&lt;br /&gt;
&lt;br /&gt;
== Ignoring files ==&lt;br /&gt;
&lt;br /&gt;
Mercurial stores general ignore patterns in a file called &#039;.hgignore&#039; in the repository root, so you can add the patterns to the repository. I use the following patterns&lt;br /&gt;
&amp;lt;pre&amp;gt;.ogp$&lt;br /&gt;
/built*$&lt;br /&gt;
/build*$&lt;br /&gt;
.lvlps$&lt;br /&gt;
.aliases$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Performing a merge  =&lt;br /&gt;
&lt;br /&gt;
The following conditions needs to be true to be able to perform a merge:&lt;br /&gt;
&lt;br /&gt;
*All local changes needs to be commited (hg st should only show&amp;amp;nbsp;?)&lt;br /&gt;
*A changeset is pushed by another user to the central repository&lt;br /&gt;
*The other changeset is not yet pulled&lt;br /&gt;
&lt;br /&gt;
The merge will try to detect the differences and call LVMerge if necesarry, LVmerge will show four VIs:&lt;br /&gt;
&lt;br /&gt;
*Base, the base VI which was present in the changeset that is the same on both repositories&lt;br /&gt;
*Mine, local commited VI&lt;br /&gt;
*Their, remote VI with edits from the other user&lt;br /&gt;
&lt;br /&gt;
These are not editable.&lt;br /&gt;
&lt;br /&gt;
*Resulting, this is the VI that will be stored to disc after the merge finalizes. This file can be edited by the user&lt;br /&gt;
&lt;br /&gt;
For each diff LVMerge will give options to use either, &#039;base&#039;, &#039;mine&#039; or &#039;their&#039; code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the merge the code should be committed and pushed.&lt;br /&gt;
&lt;br /&gt;
Most Mercurial Clients will show a graph with the following layout:&lt;br /&gt;
&lt;br /&gt;
[[Image:MergeTrackHG.png|border]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the same graph from the &#039;other&#039; user, which actually performed the merge:&lt;br /&gt;
&lt;br /&gt;
[[Image:MergeTrackHG_Other.png|border]]&lt;br /&gt;
&lt;br /&gt;
Here you see the opposite actions, two changesets in the local repo and one in the remote. Only difference is the moment of branching.&lt;br /&gt;
&lt;br /&gt;
= Mercurial clients  =&lt;br /&gt;
&lt;br /&gt;
On Windows[[Image:Logo.Windows.png]], Mac[[Image:Logo.Mac.png]] and&amp;amp;nbsp; Linux [[Image:Logo.Linux.png]], there is a command line client called &#039;hg&#039;. On windows there is a context menu tool called [http://tortoisehg.bitbucket.org TortoiseHG] based on the popular TortoiseSVN and TortoiseCVS tools&lt;br /&gt;
&lt;br /&gt;
= External Links  =&lt;br /&gt;
&lt;br /&gt;
*[http://mercurial.selenic.com Official website]&lt;br /&gt;
*[http://www.hginit.com HG Init]&lt;br /&gt;
*[http://hgbook.red-bean.com/ Mercurial: The Definitive Guide]&lt;br /&gt;
*[http://redline6561.livejournal.com/362393.html Setting Up Mercurial with Apache]&lt;br /&gt;
*[http://kiln.stackexchange.com Kiln / Mercurial Knowledge site]&lt;br /&gt;
*[http://decibel.ni.com/content/groups/mercurial NI Community Mercurial User Group]&lt;br /&gt;
&lt;br /&gt;
[[Category:SCC]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SCC]]&lt;/div&gt;</summary>
		<author><name>AndreasS</name></author>
	</entry>
	<entry>
		<id>https://labviewwiki.org/w/index.php?title=Mercurial&amp;diff=4434</id>
		<title>Mercurial</title>
		<link rel="alternate" type="text/html" href="https://labviewwiki.org/w/index.php?title=Mercurial&amp;diff=4434"/>
		<updated>2011-03-28T09:11:38Z</updated>

		<summary type="html">&lt;p&gt;AndreasS: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
{{TOCright}}[[Image:Logo.Mercurial.png|right]]&lt;br /&gt;
&lt;br /&gt;
Mercurial is a [[Source Code Control|Source Code Control]] system by Selenic, it&#039;s key feature is the distributed nature of the system. This means that changes (commits) are stored in a local repository, which can be sent (pushed) to a central repository and which can be downloaded (pulled) by others.&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
Joel Spolsky has written a How-To and Why-To page called [http://Www.hginit.com HG init] (hg is the chemical symbol for Mercury).&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
Mercurial stores it&#039;s setting in a file called &#039;hgrc&#039; inside a hidden folder &#039;.hg&#039;&lt;br /&gt;
&lt;br /&gt;
== Setting up LVMerge  ==&lt;br /&gt;
&lt;br /&gt;
[http://zone.ni.com/reference/en-XX/help/371361F-01/lvhowto/configmerge_thirdparty/ LVMerge] can be used by Mercurial as a Merge tool. Add the following text to the hgrc file:&lt;br /&gt;
&amp;lt;pre&amp;gt;[merge-tools]&lt;br /&gt;
LVMerge.args = $base $other $local $output&lt;br /&gt;
LVMerge.executable = C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe&lt;br /&gt;
LVMerge.gui = True&lt;br /&gt;
LVMerge.binary = True&lt;br /&gt;
[merge-patterns]&lt;br /&gt;
**.vi = LVMerge&lt;br /&gt;
**.ctl = LVMerge&lt;br /&gt;
**.lvclass = LVMerge&lt;br /&gt;
**.xctl = LVMerge&lt;br /&gt;
**.lvlib =LVMerge&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Setting up LVDiff ==&lt;br /&gt;
&lt;br /&gt;
[http://meta-diff.sourceforge.net/ LVDiff] is a software package that uses the built in diff-functionality from LabVIEW to do command line based LVDiffs.&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
&lt;br /&gt;
First thing is to [http://meta-diff.sourceforge.net/ download] LVDiff, copy the contents of the zip-file to a location where you have writing priviliges (lvdiff uses a local ini file).&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternative: Installer from [http://decibel.ni.com/content/groups/mercurial NI Community Mercurial User Group]&lt;br /&gt;
&lt;br /&gt;
=== Adjust ===&lt;br /&gt;
&lt;br /&gt;
Then you need to open up the lvdiff.vi and implement these changes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Lvdiffcopy.png]]&lt;br /&gt;
&lt;br /&gt;
This snippet (the actual code inside lvdiff copy is shown) tests if the filenames are the same and if that&#039;s the case it calls a VI called lvdiffcopy, which creates a copy of the file2.&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
To be able to select lvdiff as the diff tool you need to add teh follwoing settings to the [merge-tools] section of the hgrc configuration file:&lt;br /&gt;
&amp;lt;pre&amp;gt;lvdiff.diffargs = $child $parent&lt;br /&gt;
lvdiff.executable =C:\Program Files\lvdiff\lvdiff.exe&lt;br /&gt;
lvdiff.gui = True&lt;br /&gt;
lvdiff.binary = True&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using TortoiseHg 1.0 or later, you can add a [diff-patterns] section to your hgrc file, analogous to the merge-patterns section mentioned above. This will enable automatic selection of the visual diff tool (see [http://tortoisehg.bitbucket.org/manual/1.0/common.html#word-diffs]):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[diff-patterns]&lt;br /&gt;
**.vi = lvdiff&lt;br /&gt;
**.ctl = lvdiff&lt;br /&gt;
**.lvclass = lvdiff&lt;br /&gt;
**.xctl = lvdiff&lt;br /&gt;
**.lvlib = lvdiff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Start LVDiff ===&lt;br /&gt;
&lt;br /&gt;
You can start lvdiff in TorsoiseHg in the &#039;commit&#039; dialog with right-click and &#039;Visual Diff&#039;:&lt;br /&gt;
&lt;br /&gt;
[[Image:StartVisualDiff.png]]&lt;br /&gt;
&lt;br /&gt;
In the following dialog, select &#039;LVDiff&#039; and double click on the VI to diff:&lt;br /&gt;
&lt;br /&gt;
[[Image:HG_LVDIffStart.png]]&lt;br /&gt;
&lt;br /&gt;
After this LVdiff will launch LabVIEW and both VI (current and committed) will be compared.&lt;br /&gt;
&lt;br /&gt;
== Ignoring files ==&lt;br /&gt;
&lt;br /&gt;
Mercurial stores general ignore patterns in a file called &#039;.hgignore&#039; in the repository root, so you can add the patterns to the repository. I use the following patterns&lt;br /&gt;
&amp;lt;pre&amp;gt;.ogp$&lt;br /&gt;
/built*$&lt;br /&gt;
/build*$&lt;br /&gt;
.lvlps$&lt;br /&gt;
.aliases$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Performing a merge  =&lt;br /&gt;
&lt;br /&gt;
The following conditions needs to be true to be able to perform a merge:&lt;br /&gt;
&lt;br /&gt;
*All local changes needs to be commited (hg st should only show&amp;amp;nbsp;?)&lt;br /&gt;
*A changeset is pushed by another user to the central repository&lt;br /&gt;
*The other changeset is not yet pulled&lt;br /&gt;
&lt;br /&gt;
The merge will try to detect the differences and call LVMerge if necesarry, LVmerge will show four VIs:&lt;br /&gt;
&lt;br /&gt;
*Base, the base VI which was present in the changeset that is the same on both repositories&lt;br /&gt;
*Mine, local commited VI&lt;br /&gt;
*Their, remote VI with edits from the other user&lt;br /&gt;
&lt;br /&gt;
These are not editable.&lt;br /&gt;
&lt;br /&gt;
*Resulting, this is the VI that will be stored to disc after the merge finalizes. This file can be edited by the user&lt;br /&gt;
&lt;br /&gt;
For each diff LVMerge will give options to use either, &#039;base&#039;, &#039;mine&#039; or &#039;their&#039; code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the merge the code should be committed and pushed.&lt;br /&gt;
&lt;br /&gt;
Most Mercurial Clients will show a graph with the following layout:&lt;br /&gt;
&lt;br /&gt;
[[Image:MergeTrackHG.png|border]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the same graph from the &#039;other&#039; user, which actually performed the merge:&lt;br /&gt;
&lt;br /&gt;
[[Image:MergeTrackHG_Other.png|border]]&lt;br /&gt;
&lt;br /&gt;
Here you see the opposite actions, two changesets in the local repo and one in the remote. Only difference is the moment of branching.&lt;br /&gt;
&lt;br /&gt;
= Mercurial clients  =&lt;br /&gt;
&lt;br /&gt;
On Windows[[Image:Logo.Windows.png]], Mac[[Image:Logo.Mac.png]] and&amp;amp;nbsp; Linux [[Image:Logo.Linux.png]], there is a command line client called &#039;hg&#039;. On windows there is a context menu tool called [http://tortoisehg.bitbucket.org TortoiseHG] based on the popular TortoiseSVN and TortoiseCVS tools&lt;br /&gt;
&lt;br /&gt;
= External Links  =&lt;br /&gt;
&lt;br /&gt;
*[http://mercurial.selenic.com Official website]&lt;br /&gt;
*[http://www.hginit.com HG Init]&lt;br /&gt;
*[http://hgbook.red-bean.com/ Mercurial: The Definitive Guide]&lt;br /&gt;
*[http://redline6561.livejournal.com/362393.html Setting Up Mercurial with Apache]&lt;br /&gt;
*[http://kiln.stackexchange.com Kiln / Mercurial Knowledge site]&lt;br /&gt;
&lt;br /&gt;
[[Category:SCC]]&lt;/div&gt;</summary>
		<author><name>AndreasS</name></author>
	</entry>
</feed>