-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate with latest version of grit. Load gmCommands from applicati…
…on support directory.
- Loading branch information
Justin Palmer
committed
Aug 30, 2008
1 parent
864414b
commit 2c76c3c
Showing
22 changed files
with
3,272 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$VERBOSE = nil | ||
require 'rubygems' | ||
require 'pathname' | ||
require 'osx/cocoa' | ||
|
||
|
||
# Do some mangling to the load order so grit will use our bundled | ||
# items instead of the gem versions. | ||
# | ||
libdir = OSX::NSBundle.mainBundle.resourcePath.stringByAppendingPathComponent("lib").fileSystemRepresentation | ||
$:.unshift(libdir, "#{libdir}/grit/lib", "#{libdir}/mime-types/lib", "#{libdir}/open4/lib", "#{libdir}/diff-lcs/lib") | ||
|
||
require 'grit' | ||
|
||
# Require some core extensions | ||
# | ||
require 'time_extensions' | ||
require 'string_extensions' | ||
require 'osx_notify' | ||
|
||
# Custom gravatar cell support | ||
# | ||
OSX.ns_import 'CommitSummaryCell' | ||
include OSX | ||
|
||
# we use ENV['PWD'] instead of Dir.getwd if it exists so | ||
# `open GitNub` will work, since that launches us at / but leaves ENV['PWD'] intact | ||
# | ||
pwd = Pathname.new(ENV['PWD'].nil? ? Dir.getwd : ENV['PWD']) | ||
REPOSITORY_LOCATION = pwd + `cd #{pwd} && git rev-parse --git-dir 2>/dev/null`.chomp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Revision history for Ruby library Diff::LCS. Unless explicitly noted otherwise, | ||
all changes are produced by Austin Ziegler <diff-lcs@halostatue.ca>. | ||
|
||
== Diff::LCS 1.1.2 | ||
* Fixed a problem reported by Mauricio Fernandez in htmldiff. Future versions | ||
of Diff::LCS will be removing this program. | ||
|
||
== Diff::LCS 1.1.1 | ||
* Fixed bug #891: | ||
http://rubyforge.org/tracker/?func=detail&atid=407&aid=891&group_id=84 | ||
* Fixed a problem with callback initialisation code (it assumed that all | ||
callbacks passed as classes can be initialised; now, it rescues | ||
NoMethodError in the event of private :new being called). | ||
* Modified the non-initialisable callbacks to have a private #new method. | ||
* Moved ldiff core code to Diff::LCS::Ldiff (diff/lcs/ldiff.rb). | ||
|
||
== Diff::LCS 1.1.0 | ||
* Eliminated the need for Diff::LCS::Event and removed it. | ||
* Added a contextual diff callback, Diff::LCS::ContextDiffCallback. | ||
* Implemented patching/unpatching for standard Diff callback output formats | ||
with both #diff and #sdiff. | ||
* Extensive documentation changes. | ||
|
||
== Diff::LCS 1.0.4 | ||
* Fixed a problem with bin/ldiff output, especially for unified format. | ||
Newlines that should have been present weren't. | ||
* Changed the .tar.gz installer to generate Windows batch files if ones do not | ||
exist already. Removed the existing batch files as they didn't work. | ||
|
||
== Diff::LCS 1.0.3 | ||
* Fixed a problem with #traverse_sequences where the first difference from the | ||
left sequence might not be appropriately captured. | ||
|
||
== Diff::LCS 1.0.2 | ||
* Fixed an issue with ldiff not working because actions were changed from | ||
symbols to strings. | ||
|
||
== Diff::LCS 1.0.1 | ||
* Minor modifications to the gemspec, the README. | ||
* Renamed the diff program to ldiff (as well as the companion batch file) so as | ||
to not collide with the standard diff program. | ||
* Fixed issues with RubyGEMs. Requires RubyGems > 0.6.1 or >= 0.6.1 with the | ||
latest CVS version. | ||
|
||
== Diff::LCS 1.0 | ||
* Initial release based mostly on Perl's Algorithm::Diff. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Installing this package is as simple as: | ||
|
||
% ruby install.rb | ||
|
||
Alternatively, you can use the RubyGem version of Diff::LCS available as | ||
diff-lcs-1.1.2.gem from the usual sources. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
Diff::LCS README | ||
================ | ||
Diff::LCS is a port of Algorithm::Diff[1] that uses the McIlroy-Hunt | ||
longest common subsequence (LCS) algorithm to compute intelligent | ||
differences between two sequenced enumerable containers[2]. The | ||
implementation is based on Mario I. Wolczko's[3] Smalltalk version (1.2, | ||
1993)[4] and Ned Konz's[5] Perl version (Algorithm::Diff)[6]. | ||
|
||
This release is version 1.1.2, fixing an htmldiff bug in 1.1.1. Version 1.1.0 | ||
added new features, including the ability to #patch and #unpatch changes as | ||
well as a new contextual diff callback, Diff::LCS::ContextDiffCallbacks, that | ||
should improve the context sensitivity of patching. | ||
|
||
Using this module is quite simple. By default, Diff::LCS does not extend | ||
objects with the Diff::LCS interface, but will be called as if it were a | ||
function: | ||
|
||
require 'diff/lcs' | ||
|
||
seq1 = %w(a b c e h j l m n p) | ||
seq2 = %w(b c d e f j k l m r s t) | ||
|
||
lcs = Diff::LCS.LCS(seq1, seq2) | ||
diffs = Diff::LCS.diff(seq1, seq2) | ||
sdiff = Diff::LCS.sdiff(seq1, seq2) | ||
seq = Diff::LCS.traverse_sequences(seq1, seq2, callback_obj) | ||
bal = Diff::LCS.traverse_balanced(seq1, seq2, callback_obj) | ||
seq2 == Diff::LCS.patch!(seq1, diffs) | ||
seq1 == Diff::LCS.unpatch!(seq2, diffs) | ||
seq2 == Diff::LCS.patch!(seq1, sdiff) | ||
seq1 == Diff::LCS.unpatch!(seq2, sdiff) | ||
|
||
Objects can be extended with Diff::LCS: | ||
|
||
seq1.extend(Diff::LCS) | ||
lcs = seq1.lcs(seq2) | ||
diffs = seq1.diff(seq2) | ||
sdiff = seq1.sdiff(seq2) | ||
seq = seq1.traverse_sequences(seq2, callback_obj) | ||
bal = seq1.traverse_balanced(seq2, callback_obj) | ||
seq2 == seq1.patch!(diffs) | ||
seq1 == seq2.unpatch!(diffs) | ||
seq2 == seq1.patch!(sdiff) | ||
seq1 == seq2.unpatch!(sdiff) | ||
|
||
By requiring 'diff/lcs/array' or 'diff/lcs/string', Array or String will | ||
be extended for use this way. | ||
|
||
Copyright | ||
========= | ||
# Copyright 2004 Austin Ziegler <diff-lcs@halostatue.ca> | ||
# adapted from: | ||
# Algorithm::Diff (Perl) by Ned Konz <perl@bike-nomad.com> | ||
# Smalltalk by Mario I. Wolczko <mario@wolczko.com> | ||
# implements McIlroy-Hunt diff algorithm | ||
# | ||
# This program is free software. It may be redistributed and/or modified | ||
# under the terms of the GPL version 2 (or later), the Perl Artistic | ||
# licence, or the Ruby licence. | ||
# | ||
# $Id: README,v 1.7 2004/10/17 20:31:10 austin Exp $ | ||
|
||
Footnotes | ||
========= | ||
[1] This library is called Diff::LCS because there are multiple | ||
Ruby libraries called Algorithm::Diff maintained by other authors. | ||
[2] By sequenced enumerable, I mean that the order of enumeration is | ||
predictable and consistent for the same set of data. While it is | ||
theoretically possible to generate a diff for unordereded hash, it | ||
will only be meaningful if the enumeration of the hashes is | ||
consistent. In general, this will mean that containers that behave | ||
like String or Array will perform best. | ||
[3] mario@wolczko.com | ||
[4] ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st | ||
[5] perl@bike-nomad.com | ||
[6] http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15/ |
Oops, something went wrong.