[SVN] perforce textmate bundle

Justin Bishop jubishop at gmail.com
Fri Feb 23 04:22:39 UTC 2007


I SVN'd the latest perforce bundle today. I also have the cutting edge
version of perforce, and the latest support folder, however I still
had to make some tweaks to a few scripts to get them to work as I
wanted...

I will list them below, perhaps they will be useful for others (or
could be incorporated), or perhaps someone could shed light on why my
setup is different than others:

the 2 files in the Perforce.tmbundle/lib folder needed to be copied
into a respective /lib folder in the Perforce.tmbundle copy in my home
directory library.

in p4_diff.rb

In each Textmate::call_with_progress function, i had to explicitly
print the shell command to get it to show up in a new window....so

		TextMate::call_with_progress(:title => command,
									:message => "Retrieving differences",
									:output_filepath => output_path) do
			%x{"#{p4}" diff -f -du "#{rev1}" "#{rev2}"}
		end

became:

		TextMate::call_with_progress(:title => command,
									:message => "Retrieving differences",
									:output_filepath => output_path) do
			print %x{"#{p4}" diff -f -du "#{rev1}" "#{rev2}"}
		end

In the submit-changelist command, I had to change my $LOAD_PATH pushes
at the top to include 3 lines, like this:

$LOAD_PATH << ENV['TM_BUNDLE_PATH'] + "/lib"
$LOAD_PATH << ENV['TM_SUPPORT_PATH'] + "/lib"
$LOAD_PATH << ENV['TM_SUPPORT_PATH'] + "/bin"

Also, it should be noted that one will need to add TM_P4 to your list
of static textmate environment variables, or have the p4 command line
tool installed in ~/bin

Thanks.

-Justin Bishop



More information about the textmate-dev mailing list