Bug 393861 - [Backport] Make extension point for
org.eclipse.team.core.storageMergers for text file usable in a headless
environment
diff --git a/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF
index b4ff2c5..18f3007 100644
--- a/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.team.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.core; singleton:=true
-Bundle-Version: 3.5.101.qualifier
+Bundle-Version: 3.5.102.qualifier
 Bundle-Activator: org.eclipse.team.internal.core.TeamPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -23,6 +23,7 @@
  org.eclipse.team.internal.core.subscribers;x-friends:="org.eclipse.team.cvs.core,org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui,org.eclipse.team.ui"
 Require-Bundle: org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+ org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.compare.core;bundle-version="[3.3.0,4.0.0)"
 Eclipse-LazyStart: true
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.team.core/plugin.xml b/bundles/org.eclipse.team.core/plugin.xml
index 19c1902..1088a24 100644
--- a/bundles/org.eclipse.team.core/plugin.xml
+++ b/bundles/org.eclipse.team.core/plugin.xml
@@ -1,5 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
+
+<!--
+    Copyright (c) 2001, 2013 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+ 
 <plugin>
 
    <extension-point id="fileTypes" name="%FileTypesRegistry" schema="schema/fileTypes.exsd"/>
@@ -159,4 +171,14 @@
       </factory>
    </extension>
 
+   <extension
+         point="org.eclipse.team.core.storageMergers">
+      <storageMerger
+            class="org.eclipse.team.internal.core.mapping.TextStorageMerger"
+            extensions="txt"
+            id="org.eclipse.team.ui.textStorageMerger"/>
+      <contentTypeBinding
+            contentTypeId="org.eclipse.core.runtime.text"
+            storageMergerId="org.eclipse.team.ui.textStorageMerger"/>
+   </extension>
 </plugin>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java
index 711f7c1..2075977 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -120,4 +120,9 @@
 	public static String ScopeManagerEventHandler_0;
 
 	public static String ScopeManagerEventHandler_1;
+
+	public static String TextAutoMerge_inputEncodingError;
+	public static String TextAutoMerge_conflict;
+	public static String TextAutoMerge_outputEncodingError;
+	public static String TextAutoMerge_outputIOError;
 }
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java
new file mode 100644
index 0000000..bb7ed8c
--- /dev/null
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/LineComparator.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.core.mapping;
+
+import java.io.*;
+import java.util.ArrayList;
+
+import org.eclipse.compare.rangedifferencer.IRangeComparator;
+import org.eclipse.core.resources.IEncodedStorage;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * This implementation of IRangeComparator breaks an input stream into lines.
+ * Copied from org.eclipse.compare.internal.merge.LineComparator 1.4 and
+ * modified for {@link IStorage}.
+ */
+class LineComparator implements IRangeComparator {
+
+	private String[] fLines;
+
+	/*
+	 * An input stream reader that detects a trailing LF in the wrapped stream.
+	 */
+	private static class TrailingLineFeedDetector extends FilterInputStream {
+
+		boolean trailingLF = false;
+
+		protected TrailingLineFeedDetector(InputStream in) {
+			super(in);
+		}
+
+		public int read() throws IOException {
+			int c = super.read();
+			trailingLF = isLineFeed(c);
+			return c;
+		}
+
+		/*
+		 * We don't need to override read(byte[] buffer) as the javadoc of
+		 * FilterInputStream states that it will call read(byte[] buffer, int
+		 * off, int len)
+		 */
+		public int read(byte[] buffer, int off, int len) throws IOException {
+			int length = super.read(buffer, off, len);
+			if (length != -1) {
+				int index = off + length - 1;
+				if (index >= buffer.length)
+					index = buffer.length - 1;
+				trailingLF = isLineFeed(buffer[index]);
+			}
+			return length;
+		}
+
+		private boolean isLineFeed(int c) {
+			return c != -1 && c == '\n';
+		}
+
+		public boolean hadTrailingLineFeed() {
+			return trailingLF;
+		}
+
+	}
+
+	public static LineComparator create(IStorage storage, String outputEncoding)
+			throws CoreException, IOException {
+		InputStream is = new BufferedInputStream(storage.getContents());
+		try {
+			String encoding = getEncoding(storage, outputEncoding);
+			return new LineComparator(is, encoding);
+		} finally {
+			try {
+				is.close();
+			} catch (IOException e) {
+				// Ignore
+			}
+		}
+	}
+
+	private static String getEncoding(IStorage storage, String outputEncoding)
+			throws CoreException {
+		if (storage instanceof IEncodedStorage) {
+			IEncodedStorage es = (IEncodedStorage) storage;
+			String charset = es.getCharset();
+			if (charset != null)
+				return charset;
+		}
+		return outputEncoding;
+	}
+
+	public LineComparator(InputStream is, String encoding) throws IOException {
+
+		TrailingLineFeedDetector trailingLineFeedDetector = new TrailingLineFeedDetector(
+				is);
+		BufferedReader br = new BufferedReader(new InputStreamReader(
+				trailingLineFeedDetector, encoding));
+		String line;
+		ArrayList ar = new ArrayList();
+		while ((line = br.readLine()) != null) {
+			ar.add(line);
+		}
+		// Add a trailing line if the last character in the file was a line
+		// feed.
+		// We do this because a BufferedReader doesn't distinguish the case
+		// where the last line has or doesn't have a trailing line separator
+		if (trailingLineFeedDetector.hadTrailingLineFeed()) {
+			ar.add(""); //$NON-NLS-1$
+		}
+		fLines = (String[]) ar.toArray(new String[ar.size()]);
+	}
+
+	String getLine(int ix) {
+		return fLines[ix];
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.compare.rangedifferencer.IRangeComparator#getRangeCount()
+	 */
+	public int getRangeCount() {
+		return fLines.length;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.compare.rangedifferencer.IRangeComparator#rangesEqual(int,
+	 * org.eclipse.compare.rangedifferencer.IRangeComparator, int)
+	 */
+	public boolean rangesEqual(int thisIndex, IRangeComparator other,
+			int otherIndex) {
+		String s1 = fLines[thisIndex];
+		String s2 = ((LineComparator) other).fLines[otherIndex];
+		return s1.equals(s2);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.compare.rangedifferencer.IRangeComparator#skipRangeComparison
+	 * (int, int, org.eclipse.compare.rangedifferencer.IRangeComparator)
+	 */
+	public boolean skipRangeComparison(int length, int maxLength,
+			IRangeComparator other) {
+		return false;
+	}
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/TextStorageMerger.java
similarity index 75%
rename from bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java
rename to bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/TextStorageMerger.java
index 6c2f88c..51cfb37 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TextStorageMerger.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/TextStorageMerger.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,17 +8,17 @@
  * Contributors:
  * IBM Corporation - initial API and implementation
  *******************************************************************************/
-package org.eclipse.team.internal.ui.mapping;
+package org.eclipse.team.internal.core.mapping;
 
 import java.io.*;
 
-import org.eclipse.compare.CompareUI;
 import org.eclipse.compare.rangedifferencer.RangeDifference;
 import org.eclipse.compare.rangedifferencer.RangeDifferencer;
 import org.eclipse.core.resources.IStorage;
 import org.eclipse.core.runtime.*;
 import org.eclipse.team.core.mapping.IStorageMerger;
-import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.team.internal.core.Messages;
+import org.eclipse.team.internal.core.TeamPlugin;
 
 public class TextStorageMerger implements IStorageMerger {
 
@@ -33,9 +33,9 @@
 			t= LineComparator.create(target, outputEncoding);
 			o= LineComparator.create(other,outputEncoding);
 		} catch (UnsupportedEncodingException e) {
-			throw new CoreException (new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, UNSUPPORTED_ENCODING, TeamUIMessages.TextAutoMerge_inputEncodingError, e));
+			throw new CoreException (new Status(IStatus.ERROR, TeamPlugin.ID, UNSUPPORTED_ENCODING, Messages.TextAutoMerge_inputEncodingError, e));
 		} catch (IOException e) {
-			throw new CoreException (new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, INTERNAL_ERROR, e.getMessage(), e));
+			throw new CoreException (new Status(IStatus.ERROR, TeamPlugin.ID, INTERNAL_ERROR, e.getMessage(), e));
 		}
 
 		try {
@@ -72,7 +72,7 @@
 					break;
 
 				case RangeDifference.CONFLICT:
-					return new Status(IStatus.WARNING, CompareUI.PLUGIN_ID, CONFLICT, TeamUIMessages.TextAutoMerge_conflict, null);
+					return new Status(IStatus.WARNING, TeamPlugin.ID, CONFLICT, Messages.TextAutoMerge_conflict, null);
 
 				default:
 					break;
@@ -80,9 +80,9 @@
 			}
 
 		} catch (UnsupportedEncodingException e) {
-			throw new CoreException (new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, UNSUPPORTED_ENCODING, TeamUIMessages.TextAutoMerge_outputEncodingError, e));
+			throw new CoreException (new Status(IStatus.ERROR, TeamPlugin.ID, UNSUPPORTED_ENCODING, Messages.TextAutoMerge_outputEncodingError, e));
 		} catch (IOException e) {
-			return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, INTERNAL_ERROR, TeamUIMessages.TextAutoMerge_outputIOError, e);
+			return new Status(IStatus.ERROR, TeamPlugin.ID, INTERNAL_ERROR, Messages.TextAutoMerge_outputIOError, e);
 		}
 
 		return Status.OK_STATUS;
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
index ae78655..3f244cb 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2013 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -99,3 +99,8 @@
 WorkspaceSubscriber_1=Multiple errors occurred
 ScopeManagerEventHandler_0=Refreshing {0}
 ScopeManagerEventHandler_1=Errors occurred while refreshing {0}
+
+TextAutoMerge_inputEncodingError= Unsupported encoding for input stream
+TextAutoMerge_outputEncodingError= Unsupported encoding for output stream
+TextAutoMerge_outputIOError= I/O error on writing
+TextAutoMerge_conflict= Conflict: cannot auto-merge
diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml
index b51cd55..744c8bc 100644
--- a/bundles/org.eclipse.team.ui/plugin.xml
+++ b/bundles/org.eclipse.team.ui/plugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2001, 2013 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <plugin>
 
      <extension-point id="configurationWizards" name="%configurationWizards" schema="schema/configurationWizards.exsd"/>
@@ -539,17 +550,7 @@
             preferencePage="org.eclipse.team.internal.ui.preferences.ResourceModelPreferencePage"
             supportsFlatLayout="true"/>
    </extension>
-   <extension
-         point="org.eclipse.team.core.storageMergers">
-      <storageMerger
-            class="org.eclipse.team.internal.ui.mapping.TextStorageMerger"
-            extensions="txt"
-            id="org.eclipse.team.ui.textStorageMerger"/>
-      <contentTypeBinding
-            contentTypeId="org.eclipse.core.runtime.text"
-            storageMergerId="org.eclipse.team.ui.textStorageMerger"/>
-   </extension>
-   
+
    <!-- *************** Activity Support **************** -->
     <extension
           point="org.eclipse.ui.activitySupport">
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
index 1a39e2a..dccc326 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -626,11 +626,6 @@
 	
 	public static String GenericHistoryView_PinCurrentHistory;
 
-	public static String TextAutoMerge_inputEncodingError;
-	public static String TextAutoMerge_conflict;
-	public static String TextAutoMerge_outputEncodingError;
-	public static String TextAutoMerge_outputIOError;
-
 	public static String GenericHistoryView_0;
 
 	public static String LocalHistoryTableProvider_localRevision;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java
deleted file mode 100644
index c5ad805..0000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/LineComparator.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.mapping;
-
-import java.io.*;
-import java.util.ArrayList;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * This implementation of IRangeComparator breaks an input stream into lines.
- * Copied from org.eclipse.compare.internal.merge.LineComparator 1.4 and
- * modified for {@link IStorage}.
- */
-class LineComparator implements IRangeComparator {
-
-    private String[] fLines;
-
-    /*
-     * An input stream reader that detects a trailing LF in the wrapped stream.
-     */
-    private static class TrailingLineFeedDetector extends FilterInputStream {
-
-    	boolean trailingLF = false;
-    	
-		protected TrailingLineFeedDetector(InputStream in) {
-			super(in);
-		}
-		
-		public int read() throws IOException {
-			int c = super.read();
-			trailingLF = isLineFeed(c);
-			return c;
-		}
-		
-	    /*
-	     * We don't need to override read(byte[] buffer) as the javadoc of 
-	     * FilterInputStream states that it will call read(byte[] buffer, int off, int len)
-	     */
-		public int read(byte[] buffer, int off, int len) throws IOException {
-			int length = super.read(buffer, off, len);
-			if (length != -1) {
-				int index = off + length - 1;
-				if (index >= buffer.length)
-					index = buffer.length - 1;
-				trailingLF = isLineFeed(buffer[index]);
-			}
-			return length;
-		}
-
-		private boolean isLineFeed(int c) {
-			return c != -1 && c == '\n';
-		}
-		
-		public boolean hadTrailingLineFeed() {
-			return trailingLF;
-		}
-    	
-    }
-    
-    public static LineComparator create(IStorage storage, String outputEncoding) throws CoreException, IOException {
-    	InputStream is = new BufferedInputStream(storage.getContents());
-    	try {
-			String encoding = getEncoding(storage, outputEncoding);
-			return new LineComparator(is, encoding);
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				// Ignore
-			}
-		}
-    }
-    
-	private static String getEncoding(IStorage storage, String outputEncoding) throws CoreException {
-		if (storage instanceof IEncodedStorage) {
-			IEncodedStorage es = (IEncodedStorage) storage;
-			String charset = es.getCharset();
-			if (charset != null)
-				return charset;
-		}
-		return outputEncoding;
-	}
-	
-    public LineComparator(InputStream is, String encoding) throws IOException {
-        
-        TrailingLineFeedDetector trailingLineFeedDetector = new TrailingLineFeedDetector(is);
-		BufferedReader br = new BufferedReader(new InputStreamReader(trailingLineFeedDetector, encoding));
-        String line;
-        ArrayList ar = new ArrayList();
-        while ((line = br.readLine()) != null) {
-            ar.add(line);
-        }
-        try {
-            is.close();
-        } catch (IOException e1) {
-        }
-        // Add a trailing line if the last character in the file was a line feed.
-        // We do this because a BufferedReader doesn't distinguish the case
-        // where the last line has or doesn't have a trailing line separator
-        if (trailingLineFeedDetector.hadTrailingLineFeed()) {
-        	ar.add(""); //$NON-NLS-1$
-        }
-        fLines = (String[]) ar.toArray(new String[ar.size()]);
-    }
-
-	String getLine(int ix) {
-        return fLines[ix];
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.compare.rangedifferencer.IRangeComparator#getRangeCount()
-     */
-    public int getRangeCount() {
-        return fLines.length;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.compare.rangedifferencer.IRangeComparator#rangesEqual(int, org.eclipse.compare.rangedifferencer.IRangeComparator, int)
-     */
-    public boolean rangesEqual(int thisIndex, IRangeComparator other,
-            int otherIndex) {
-        String s1 = fLines[thisIndex];
-        String s2 = ((LineComparator) other).fLines[otherIndex];
-        return s1.equals(s2);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.compare.rangedifferencer.IRangeComparator#skipRangeComparison(int, int, org.eclipse.compare.rangedifferencer.IRangeComparator)
-     */
-    public boolean skipRangeComparison(int length, int maxLength, IRangeComparator other) {
-        return false;
-    }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
index 81259e8..7764697 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2013 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -457,10 +457,6 @@
 AdditionalMappingsDialog_0=Additional elements must be included in the current operation due to the relationship between the selected elements and the files in which they are stored.
 AdditionalMappingsDialog_1=These are the elements you &selected:
 AdditionalMappingsDialog_2=These are the elements that will be included in the &operation:
-TextAutoMerge_inputEncodingError= Unsupported encoding for input stream
-TextAutoMerge_outputEncodingError= Unsupported encoding for output stream
-TextAutoMerge_outputIOError= I/O error on writing
-TextAutoMerge_conflict= Conflict: cannot auto-merge
 LocalHistoryTableProvider_localRevision=<local revision>
 LocalHistoryPage_openRevision=Open Revision
 LocalHistoryPage_CompareAction=&Compare