eclipse - svn synchronize - file differs only in line feed - eclipse

I'm working in a group where there are developers that use linux, windows and mac.
Often happens that in SVN repository text files have different text file line delimiters (CR / CRLF / LF).
Someone know if I could avoid to compare line delimiters during eclipse svn synchronize?

You can set an svn:eol-style propery on files, possibly even using automatic properties in svn (in linux that would usually be the [auto-props] section in ~/.subversion/config )

Related

Apache Netbeans changing default delimiter

Despite having changed the pcs regional delimiter to a "." Netbeans 12 is still using a ",". I have tried adding the following to the netbeans.conf file but it has no effect:
-J-Duser.language=en -J-Duser.country=US
How do you force netbeans to use a particular local via the conf file?
I had changed the delimiter on win 10 but not the entire format for the pc. By changing the whole format to English UK, Netbeans honours the change.

TortoiseGit and UnityYAMLMerge

I'm trying to setup TortoiseGit to work with UnityYAMLMerge, but when I press to try to edit a .unity file conflict, I see a console window open up and close too fast to read anything in it.
I set it up just like in the docs and this vid: https://www.youtube.com/watch?v=RcJwamDAAGk
This is how I set it up:
What else can I do to make it work?
From Smart Merge
UnityYAMLMerge is shipped with a default fallback file (called mergespecfile.txt, also in the Tools folder) that specifies how it should proceed with unresolved conflicts or unknown files. This also allows you to use it as the main merge tool for version control systems (such as git) that don’t automatically select merge tools based on file extensions. The most common tools are already listed by default in mergespecfile.txt but you can edit this file to add new tools or change options.
Using TortoiseGitMerge as fallback
Edit C:\Program Files\Unity\Editor\Data\Tools\mergespecfile.txt for fallback file and teach UnityYAMLMerge to use TortoiseGitMerge:
# TortoiseGitMerge
* use "%programs%\TortoiseGit\bin\TortoiseGitMerge.exe" /base:"%b" /mine:"%l" /theirs:"%r" /merged:"%d"
From Resoving Unity Scene Merge Conflicts with UnityYAMLMerge (Smart Merge) and TortoiseGit

Set HSQL script newline format

We have a HSQL .script file in source control. Some of our developers use Linux, some use Windows. Each time there is a commit we have to deal with conflicts (each line in file has one) due to platform specific newline characters in script.
Is there a way to specify newline format for the HSQL script file.
You cannot specify the end of line (eol) format for the HSQLDB script. HSQLDB can read the .script file regardless of the eol format used when the file was saved.
Source control system usually allow to specify the eol format to use for text files. For example, Subversion has a svn:eol-style property which can be set to "native" for all or individual files.

How do I integrate Beyond Compare with ClearCase?

I would like to integrate Beyond Compare with ClearCase so that I can use it for diffing and merging files, instead of the awful tools provided by ClearCase.
Does anyone have instructions for performing this integration?
As mentioned in my previous answer, just modify the map file located in:
# up to ClearCase 7.0
c:\program files\rational\ClearCase\lib\mgrs
or
# ClearCase 7.1 and more
c:\program files\IBM\RationalSDLC\ClearCase\lib\mgrs
Each map line has 3 parts: the CC filetype, the CC action, and the application.
In your case, find the section in the map file for text_file_delta file types.
There you will find lines for CC actions compare, xcompare, merge, and xmerge.
Use BeyondCompare:
text_file_delta xcompare C:\Progra~1\Beyond~1\bc2.exe
Beyond Compare 3 support all CC actions:
text_file_delta compare C:\Program Files\Beyond Compare 3\BComp.exe
text_file_delta xcompare C:\Program Files\Beyond Compare 3\BComp.exe
text_file_delta merge C:\Program Files\Beyond Compare 3\BComp.exe
text_file_delta xmerge C:\Program Files\Beyond Compare 3\BComp.exe
Note: For Beyond Compare 2, this page clearly mentions
To use Beyond Compare 2, only change the xcompare line of the map file.
Overriding compare, merge, and xmerge is not supported.
A helper that improves BC2's support is available here.
Note that what precedes is for ClearCase only, not CCRC (ClearCase Remote Client)
This technote illustrates how to change the XML diff/Merge tool for CCRC (KDiff3 but you can adapt it to BeyondCompare):
Change directories to the CCRC installation location > plugins > com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver>,
Where <os> is the name of the operating system bits used and <ccrc ver> is the latest version of the CCRC update applied on the client.
On Windows
CCRC 7.1 Default: C:\Program Files\IBM\IMShared\plugins
CCRC 7.0 Default: C:\Program Files\IBM\Rational\ClearCase\CCRC\plugins\
Example:
com.ibm.rational.clearcase.compare_merge.win32x86_7.0.1.CU02
Copy the KDiff3 executable from its installation path to the com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver> directory
Rename the ccrc_xmldiffmrg.exe to ccrc_xmldiffmrg_orig.exe
Rename KDiff3.exe to ccrc_xmldiffmrg.exe
Close and reopen CCRC
CCRC Issue:
When updating CCRC, the plug-in directory com.ibm.rational.clearcase.compare_merge.<os>_<ccrc ver> will change.
The steps above will need to be run again in the new plug-in directory.
Note: You can control when the updates occur by preventing CCRC from looking for updates automatically.
Click Window > Preferences > Install/Update > Automatic Updates and disable automatic updates.
An alternative to Beyond Compare is KDiff3, which integrates very nicely with clearcase. Just tick off for clearcase integration when installing, and you're done.
Just to piggy back on Von's answer if you're lazy like me.
if you can search and replace with regex (like notepad++)
Find What:((text_file_delta|_html|_xml|html2|xml2)[ \t]+(compare|xcompare|merge|xmerge)[ \t]+).*
Replace with: \1C:\\Program Files\\Beyond Compare 3\\BCompare.exe
does all of the lines VonC mentioned for regular clearcase.
(assuming you have beyond compare installed at the above location, otherwise point to your path).
I also found it interesting, I put "'s around the path (due to the spaces) and it didn't work, removing them solved that problem.
There's also the 'official' way on the BC support page:
Ofiicial Tip by Scooter
1. Locate the plugins folder, which will contain a specific version named subfolder. Examples:
C:\Program Files\IBM\Rational\ClearCase701\CCRC\plugins\com.ibm.rational.clearcase.compare_merge.win32.x86_7.0.1.D061004
C:\Program Files\IBM\IMShared\plugins\com.ibm.rational.clearcase.compare_merge.win32.x86_7.1.1.v201007070751
Note that the version number in path is subject to change.
2. Copy "C:\Program Files\Beyond Compare 3\bcomp.exe" into the folder.
3. Move ccrc_cleardiff.exe, ccrc_cleardiffmrg.exe, ccrc_worddiffmrg.exe and ccrc_xmldiffmrg.exe to a backup folder.
4. Make 4 copies of bcomp.exe and rename them to ccrc_cleardiff.exe, ccrc_cleardiffmrg.exe, ccrc_worddiffmrg.exe and ccrc_xmldiffmrg.exe.
5. Change "CCRC Integrated (UTF-8)" to "ClearCase External" under Preferences | CCRC | Integration | Compare_Merge.
BUT there's something else you should do.
When setting the merge tool, you should override the comparison to the original 'CCRC Integrated', like so:
BC does not yet handle Clear Case Directory Comparison.

how can I have eclipse auto insert subversion revision number into my code

I'm interested in displaying the version number of my code in a help page. Ideally I'd use a Major.Minor.SVNrevision format, where the SVNrevision number was pulled automatically. I hope? Suspect there's a variable I can access somewhere, but have no idea what it may be.
Any hints?
You can do this by adding so-called SVN Keywords into your working files. This chapter contains standard SVN keywords. Then you have two options:
set property for each folder svn:keywords to make this substitution available for all who works with this repository: svn propset svn:keywords "Date Author Revision" help.html
modify svn configuration file (on Windows: %USERPROFILE%\Application Data\Subversion\config, on Linux: ~/.subversion/config) to enable automatic properties for all repositories and files (according to pattern) you're working with: set enable-auto-props to yes and then add to [auto-props] section: *.html = svn:keywords=Date Author Revision
If your help files are versioned, I would add an external script as an Eclipse builder in order to make some keyword substitution (using for instance svnversion)
But if your help files are generated, may be this kind of script can help (also based on svnversion to get back the "GlobalRev").
Major and Minor version information need to be stored and retrieved from another souce though: they are not "svn-related" informations.