[TxMt] TM2 - Subversion - Replace Conflict With Older/Newer Text

Quinn Comendant quinn at strangecode.com
Wed Feb 19 01:34:37 UTC 2014


Is anybody else having trouble using the default "Replace Conflict With Older Text" and "Replace Conflict With Newer Text" macros? They don't seem to work for me.

If I try to record a new macro, it doesn't remember the 'replace' value. That is, it works until I run some other search/replace command then my new macro for resolving conflicts just runs the last-used replace value. The macro I recorded contains this:

(
	{	argument = {
			action = 'findNext';
			findString = '(?m:<<<<<<<[^\n]*?\n(.*?\n?)=======\n(.*?\n?)>>>>>>>([^\n]*)\n)';
			ignoreCase = :true;
			regularExpression = :true;
			wrapAround = :true;
		};
		command = 'findWithOptions:';
	},
	{	command = 'replaceAllInSelection:'; },
)

See, no replace value. So I added a 'replaceString' item manually:

(
	{	argument = {
			action = 'findNext';
			findString = '(?m:<<<<<<<[^\n]*?\n(.*?\n?)=======\n(.*?\n?)>>>>>>>([^\n]*)\n)';
			ignoreCase = :true;
			regularExpression = :true;
			wrapAround = :true;
			replaceAllScope = 'document';
			replaceString = '$1';
		};
		command = 'findWithOptions:';
	},
	{	command = 'replaceAllInSelection:'; },
)

But it doesn't use this value, only the last one used in the find dialog box.

Any ideas?

-- 
Quinn Comendant
Strangecode, LLC
http://www.strangecode.com/
+1 530 624 4410 mobile
+1 530 636 2633 office
@qc and @strangecode



More information about the textmate mailing list