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

Quinn Comendant quinn at strangecode.com
Mon Jul 28 20:43:54 UTC 2014


Allan,

So it's been a few months since this issue came up, and I think I never used the Subversion merge commands since discussing it with you, but today I noticed they still don't work. You mention you fixed the macro replay code, and I think I'm running the latest version (under Preferences > Bundles > Subversion it says "Updated: Last month"). Is there a function to reload a bundle to the pristine state, so I can be sure I've got the correctly working copy?

Quinn

On 20 Feb 2014, at 8:34, Allan Odgaard wrote:
> […] record a new macro, it doesn't remember the 'replace' value

The rule is that when using the find dialog, values are recorded in the 
macro, whereas using the menu / keyboard shortcuts, only the action gets 
recorded (i.e. “find next”, “replace and find”, etc.).

Previously, the replace string was only included (in the recorded 
values) if the action was actually a replace action. Though I have now 
changed that, so that the replace string is always recorded when using 
the find dialog to execute the action.

> I added a 'replaceString' item manually […] But it doesn't use this 
> value,
> only the last one used in the find dialog box.

I have fixed the macro replay code to use the string provided as 
argument (rather than the “current” replace string), so the 
Subversion macros will work starting with next build.


On Tue, 18 Feb 2014 19:34:37 -0600, Quinn Comendant wrote:
> 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?


More information about the textmate mailing list