Posts Tagged ‘TextMate’

TextMate & Subversion 1.5 update problem with conflict

Tuesday, October 28th, 2008

We recently upgraded to Subversion 1.5 server at BBC Worldwide. I ended up upgrading my client at the same time with the latest OSX binary from Colabnet.
One weird thing started to happen though: whenever there were conflicts, TextMate wouldn’t allow me to use the ‘Resolve Conflicts with FileMerge…’.

Long story short: the interactive mode keeps TextMate from getting all the data so you don’t get the .rxxx & .mine files which are needed for FileMerge to show you the differences.

To fix this is:

  1. go into your TextMate Subversion Bundle
  2. go to the ‘Update to Newest (HEAD)’ command and add
    --non-interactive after '#{svn}' update

You can see the resulting code here (change on line 14).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)"
 
"${TM_RUBY:-ruby}" -r "$TM_SUPPORT_PATH/lib/shelltokenize.rb" <<END
	svn = ENV['TM_SVN'] || "svn"
	ruby = ENV['TM_RUBY'] || "ruby"
	support = ENV['TM_BUNDLE_SUPPORT']
	paths = TextMate.selected_paths_array
 
	# TODO: Ideally, we'd like to use a tooltip for one and not others, but we can't switch from a tooltip
	# to dynamic HTML output (or maybe we could double-fork a process?)
	# if ((paths.size == 1) and not (File.directory? paths[0]))
	#	puts %x{#{svn} update #{TextMate.selected_paths_for_shell}}
	# else
		update = IO.popen("'#{svn}' update --non-interactive #{TextMate.selected_paths_for_shell}", 'r')
		format = IO.popen("'#{ruby}' -- '#{support}/format_status.rb'", 'w')
		update.each_line { |line| format.puts(line) }
	# end	
END
 
# force TM to refresh the current file..
rescan_project