<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The eflow blog &#187; license</title>
	<atom:link href="http://blog.eflow.org/archives/tag/license/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.eflow.org</link>
	<description>Insert some amazingly witty tagline here</description>
	<lastBuildDate>Fri, 09 Dec 2011 18:59:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Merging Apparently Non-Conflicting Conflicts with SVN</title>
		<link>http://blog.eflow.org/archives/45</link>
		<comments>http://blog.eflow.org/archives/45#comments</comments>
		<pubDate>Mon, 28 Apr 2008 21:14:42 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[openmrs]]></category>
		<category><![CDATA[license]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.eflow.org/?p=45</guid>
		<description><![CDATA[Saptarshi Purkayastha, an OpenMRS GSoC student this year, wrote mini java script and submitted a patch for adding the OpenMRS license to all of our java files. This was long overdue and was much appreciated, thanks Saptarshi! Submitting this to trunk was no trouble at all, all things went as normal. However, when merging from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sunnytalkstech.blogspot.com/">Saptarshi Purkayastha</a>, an <a href="http://openmrs.org">OpenMRS</a> <a href="http://code.google.com/soc">GSoC</a> student this year, wrote mini java script and <a href="http://dev.openmrs.org/ticket/188">submitted a patch</a> for adding the OpenMRS license to all of our java files.  This was long overdue and was much appreciated, thanks Saptarshi!</p>
<p>Submitting this to trunk was no trouble at all, all things went as normal.  However, when merging from trunk to other branches, I kept running into problems.  All files that received the new license were showing as conflicts, even though there were no other changes.  I had to manually copy the license from the old file to merged file.  NOT fun.  I did this manually when I was merging to the report-api-refactoring branch because it was late and I didn&#8217;t want to look up the &#8220;right&#8221; way to fix it.</p>
<p>Well, I think I found the reason.  Java file handlers don&#8217;t do prepending very well.  The script that Saptarshi wrote creates a new file with the license code, and then appends the old file contents.  The java newLine() method used in the java script to append that old file contents apparently uses a different newline character than the default for unix/windows.</p>
<p>This minor little difference caused two problems: 1) merging produced conflicts and 2) when comparing versions or showing annotations it showed that I had changed <em>all</em> lines when in fact I had just added the license header.</p>
<p>The fix for problem 1 above was to merge from trunk with the <em>ignore-eol-style</em> flag set:</p>
<blockquote><p>svn merge -x&ndash;&ndash;ignore-eol-style -r3684:3685 http://svn.openmrs.org/openmrs/trunk /home/ben/workspace/openmrs-api-refactoring</p></blockquote>
<p><em>Note: I merged from trunk up to version 3684 first using the Subclipse svn gui (3685 was the revision with the license patch).  I ran the above at the command line to get a nice clean successful merge.  I was then able to merge from 3685 to HEAD using subclipse again.</em></p>
<p>I can&#8217;t really tell if this fixed problem 2 as well because I can&#8217;t remember which files this was happening to before.  The few files I queried were only showing me as having changed the first few license lines, so it appears to have solved it.</p>
 <img src="http://blog.eflow.org/wp-content/plugins/feed-statistics.php?view=1&post_id=45" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.eflow.org/archives/45/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

