diff --git a/ApplicationController.m b/ApplicationController.m index 746a148..3a86d38 100644 --- a/ApplicationController.m +++ b/ApplicationController.m @@ -21,7 +21,7 @@ - (ApplicationController*)init { -#ifndef NDEBUG +#ifdef DEBUG_BUILD [NSApp activateIgnoringOtherApps:YES]; #endif diff --git a/Documentation/ReleaseNotes.txt b/Documentation/ReleaseNotes.txt deleted file mode 100644 index 21ddcf1..0000000 --- a/Documentation/ReleaseNotes.txt +++ /dev/null @@ -1,108 +0,0 @@ -GitX Release Notes - -v0.6.1 -=== - -This is a bugfix release. The following bugs have been fixed: - -* The commit view shows new files with linebreaks -* The history view works with Git >= 1.5.4 again -* Reloading the detailed view in the History no longer causes an empty page - -v0.6 -=== - -This release has the following new features and enhancements: -* The diff display now looks much nicer, using boxes to segment files -* The toolbar can now me customized -* Images that have been changed or added in a commit can now be viewed - inline in GitX -* GitX has gained a preference pane which allows you to specify a git path - and disable the Gist and Gravatar integration -* The commit interface is now more intuitive. Particularly, you can now - select multiple files and use drag and drop to stage / unstage files -* You can now drag and drop files out of the commit view -* The files in the commit view have gained a context menu that allows you - to revert changes / open the file / ignore the file -* It is now possible to adjust the amount of context lines in the commit view. - Using a smaller context size allows you to do more fine-grained commits -* The branch menu is now organized in branches/remotes/tags -* The view switch button now uses icons rather than words -* The view shortcuts have changed to use command 1/2 for the history/commit - view. The history's subviews can now be changed using command-option-1/2/3 -* Listing commits has become much faster -* GitX no longer spawns zombie processes -* GitX now shows a list of files that have been changed in a commit - -* GitX now uses libgit2 to store object id's, reducing it's memory footprint - -In addition many bugs were fixed, including the correct calculation of a -gravatar MD5 hash. - - -v0.5 -==== - -This feature release has several new smaller or larger features: -* The current branch is now highlighted -* In the commit view, there is an option to amend commits -* The "Gist it" button now respects github.user/token -* Display a gravatar of the committer -* The commit message view now displays a vertical line at 50 characters -* It is now possible to revert changes by using the context menu in the - commit view -* You can now stage only parts of a file by using the "Stage Hunk" buttons - in the commit view -* You can now use GitX to show a diff of anything, for example by using - 'gitx --diff HEAD^^' or 'git diff HEAD~3 | gitx --diff' -* You can now drag and drop refs to move them and also create branches - -In addition, the following bugs have been fixed: -* Better detection of git version -* Branch lines are no longer interspersed with half a pixel of whitespace -* The toolbar keeps its state when switching views - -v0.4.1 -== - -This is a maintenance release. Most important fixes: - -* The diff display is now much faster -* More locations are now searched for a default git -* Code pasted online is now private - -v0.4: Changes since v0.3.1 -=== -* A new commitview, allowing you to selectively add changes and commit them. -* You can now upload a commit as a patch to gist.github.com -* GitX now searches for your git binary in more directories and is smarter - about reporting errors regarding git paths. -* You can now remove branches by right-clicking on them in the detailed view -* GitX now comes with a spicy new icon -* The diff view has become prettier and now also highlights trailing - whitespace. -* Various little changes and stability improvement - -v0.3.1 -=== -* Fixed a serious crasher - -V0.3: Changes since v0.2.1 -==== -* You can now pass on command-line arguments just like you can with 'git log' -* The program has an icon -* Also displays remote branches in the branch list -* Is better in determining if a directory is a bare git repository -* Support for --left-right: use 'gitx --left-right HEAD..origin/master' - to see which commits are only on your branch or on their branch -* Navigate through changed hunks by using j/k keys -* Scroll down in webview by using space / shift-space - -V0.2.1 -=== -* Added Sparkle update system - -V0.2: Changes since v0.1 -==== -* The graph now has colors -* There are now lables attached to commits \ No newline at end of file diff --git a/Documentation/ReleaseNotes/v0.2.1.txt b/Documentation/ReleaseNotes/v0.2.1.txt new file mode 100644 index 0000000..8ed0e9f --- /dev/null +++ b/Documentation/ReleaseNotes/v0.2.1.txt @@ -0,0 +1,3 @@ +V0.2.1 +=== +* Added Sparkle update system diff --git a/Documentation/ReleaseNotes/v0.2.txt b/Documentation/ReleaseNotes/v0.2.txt new file mode 100644 index 0000000..29ab6a3 --- /dev/null +++ b/Documentation/ReleaseNotes/v0.2.txt @@ -0,0 +1,4 @@ +V0.2: Changes since v0.1 +==== +* The graph now has colors +* There are now lables attached to commits \ No newline at end of file diff --git a/Documentation/ReleaseNotes/v0.3.1.txt b/Documentation/ReleaseNotes/v0.3.1.txt new file mode 100644 index 0000000..05d8d00 --- /dev/null +++ b/Documentation/ReleaseNotes/v0.3.1.txt @@ -0,0 +1,3 @@ +v0.3.1 +=== +* Fixed a serious crasher diff --git a/Documentation/ReleaseNotes/v0.3.txt b/Documentation/ReleaseNotes/v0.3.txt new file mode 100644 index 0000000..d46ea1d --- /dev/null +++ b/Documentation/ReleaseNotes/v0.3.txt @@ -0,0 +1,10 @@ +V0.3: Changes since v0.2.1 +==== +* You can now pass on command-line arguments just like you can with 'git log' +* The program has an icon +* Also displays remote branches in the branch list +* Is better in determining if a directory is a bare git repository +* Support for --left-right: use 'gitx --left-right HEAD..origin/master' + to see which commits are only on your branch or on their branch +* Navigate through changed hunks by using j/k keys +* Scroll down in webview by using space / shift-space diff --git a/Documentation/ReleaseNotes/v0.4.1.txt b/Documentation/ReleaseNotes/v0.4.1.txt new file mode 100644 index 0000000..b8e6a93 --- /dev/null +++ b/Documentation/ReleaseNotes/v0.4.1.txt @@ -0,0 +1,8 @@ +v0.4.1 +== + +This is a maintenance release. Most important fixes: + +* The diff display is now much faster +* More locations are now searched for a default git +* Code pasted online is now private diff --git a/Documentation/ReleaseNotes/v0.4.txt b/Documentation/ReleaseNotes/v0.4.txt new file mode 100644 index 0000000..2a4efd0 --- /dev/null +++ b/Documentation/ReleaseNotes/v0.4.txt @@ -0,0 +1,11 @@ +v0.4: Changes since v0.3.1 +=== +* A new commitview, allowing you to selectively add changes and commit them. +* You can now upload a commit as a patch to gist.github.com +* GitX now searches for your git binary in more directories and is smarter + about reporting errors regarding git paths. +* You can now remove branches by right-clicking on them in the detailed view +* GitX now comes with a spicy new icon +* The diff view has become prettier and now also highlights trailing + whitespace. +* Various little changes and stability improvement diff --git a/Documentation/ReleaseNotes/v0.5.txt b/Documentation/ReleaseNotes/v0.5.txt new file mode 100644 index 0000000..3cfcc8a --- /dev/null +++ b/Documentation/ReleaseNotes/v0.5.txt @@ -0,0 +1,23 @@ +v0.5 +==== + +This feature release has several new smaller or larger features: + +* The current branch is now highlighted +* In the commit view, there is an option to amend commits +* The "Gist it" button now respects github.user/token +* Display a gravatar of the committer +* The commit message view now displays a vertical line at 50 characters +* It is now possible to revert changes by using the context menu in the + commit view +* You can now stage only parts of a file by using the "Stage Hunk" buttons + in the commit view +* You can now use GitX to show a diff of anything, for example by using + 'gitx --diff HEAD^^' or 'git diff HEAD~3 | gitx --diff' +* You can now drag and drop refs to move them and also create branches + +In addition, the following bugs have been fixed: + +* Better detection of git version +* Branch lines are no longer interspersed with half a pixel of whitespace +* The toolbar keeps its state when switching views diff --git a/Documentation/ReleaseNotes/v0.6.1.txt b/Documentation/ReleaseNotes/v0.6.1.txt new file mode 100644 index 0000000..c77a31b --- /dev/null +++ b/Documentation/ReleaseNotes/v0.6.1.txt @@ -0,0 +1,8 @@ +v0.6.1 +=== + +This is a bugfix release. The following bugs have been fixed: + +* The commit view shows new files with linebreaks +* The history view works with Git >= 1.5.4 again +* Reloading the detailed view in the History no longer causes an empty page diff --git a/Documentation/ReleaseNotes/v0.6.2.txt b/Documentation/ReleaseNotes/v0.6.2.txt new file mode 100644 index 0000000..37303d7 --- /dev/null +++ b/Documentation/ReleaseNotes/v0.6.2.txt @@ -0,0 +1,18 @@ +v0.6.2 +=== + +This is a maintenance release. The following bugs have been fixed: + +* Fix many display bugs in the history view (Thanks to Johannes Gilger) +* Fix moving of refs +* GitX no longer stalls if you have a large amount of untracked files +* GitX now asks for confirmation before deleting a branch +* GitX no longer shows ghost files after staging a hunk +* Dragging and dropping a tree now correctly copies all files + +In addition, the following features have been added: + +* There is now a 'New…' option to create a new repository +* The 'Gist It' feature now asks for confirmation by default. This can be changed in the preferences +* GitX can now open any directory by dragging it on the icon +* GitX now asks for confirmation before deleting a branch \ No newline at end of file diff --git a/Documentation/ReleaseNotes/v0.6.txt b/Documentation/ReleaseNotes/v0.6.txt new file mode 100644 index 0000000..d152d89 --- /dev/null +++ b/Documentation/ReleaseNotes/v0.6.txt @@ -0,0 +1,29 @@ +v0.6 +=== + +This release has the following new features and enhancements: + +* The diff display now looks much nicer, using boxes to segment files +* The toolbar can now me customized +* Images that have been changed or added in a commit can now be viewed + inline in GitX +* GitX has gained a preference pane which allows you to specify a git path + and disable the Gist and Gravatar integration +* The commit interface is now more intuitive. Particularly, you can now + select multiple files and use drag and drop to stage / unstage files +* You can now drag and drop files out of the commit view +* The files in the commit view have gained a context menu that allows you + to revert changes / open the file / ignore the file +* It is now possible to adjust the amount of context lines in the commit view. + Using a smaller context size allows you to do more fine-grained commits +* The branch menu is now organized in branches/remotes/tags +* The view switch button now uses icons rather than words +* The view shortcuts have changed to use command 1/2 for the history/commit + view. The history's subviews can now be changed using command-option-1/2/3 +* Listing commits has become much faster +* GitX no longer spawns zombie processes +* GitX now shows a list of files that have been changed in a commit +* GitX now uses libgit2 to store object id's, reducing it's memory footprint + +In addition many bugs were fixed, including the correct calculation of a +gravatar MD5 hash. diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj index 000fb40..69b4dbf 100644 --- a/GitX.xcodeproj/project.pbxproj +++ b/GitX.xcodeproj/project.pbxproj @@ -757,7 +757,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\n(echo -n \"#define BUILD_NUMBER \"; git describe|sed -e \"s/\\-/\\./\" -e \"s/v//\" -e \"s/-.*//\") > build/revision\ntouch Info.plist"; + shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\nVERSION=$(git describe)\nLONG_VERSION=$(echo $VERSION | sed -e \"s/\\-/\\./\" -e \"s/^v//\" -e \"s/-.*//\")\nSHORT_VERSION=$(echo $VERSION | sed -e \"s/\\-.*//\" -e \"s/^v//\")\n\necho -n \"#define LONG_VERSION $LONG_VERSION\n#define SHORT_VERSION $SHORT_VERSION\" > build/revision\ntouch Info.plist"; }; F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = { isa = PBXShellScriptBuildPhase; @@ -969,6 +969,7 @@ GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = GitX_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ""; HEADER_SEARCH_PATHS = libgit2/src; INFOPLIST_FILE = Info.plist; INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; @@ -985,6 +986,7 @@ isa = XCBuildConfiguration; buildSettings = { GCC_ENABLE_OBJC_GC = required; + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = DEBUG_BUILD; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; diff --git a/Info.plist b/Info.plist index 1449713..9c50c45 100644 --- a/Info.plist +++ b/Info.plist @@ -49,9 +49,9 @@ CFBundleSignature ???? CFBundleVersion - BUILD_NUMBER + LONG_VERSION CFBundleShortVersionString - 0.6.1 + SHORT_VERSION NSMainNibFile MainMenu NSPrincipalClass diff --git a/PBRefController.m b/PBRefController.m index 0e1bfce..3f2c80a 100644 --- a/PBRefController.m +++ b/PBRefController.m @@ -37,15 +37,22 @@ - (void) removeRef:(PBRefMenuItem *) sender { - int ret = 1; - [historyController.repository outputForArguments:[NSArray arrayWithObjects:@"update-ref", @"-d", [[sender ref] ref], nil] retValue: &ret]; - if (ret) { - NSLog(@"Removing ref failed!"); - return; - } + NSString *ref_desc = [NSString stringWithFormat:@"%@ %@", [[sender ref] type], [[sender ref] shortName]]; + NSString *question = [NSString stringWithFormat:@"Are you sure you want to remove the %@?", ref_desc]; + int choice = NSRunAlertPanel([NSString stringWithFormat:@"Delete %@?", ref_desc], question, @"Delete", @"Cancel", nil); + // TODO: Use a non-modal alert here, so we don't block all the GitX windows - [[sender commit] removeRef:[sender ref]]; - [commitController rearrangeObjects]; + if(choice) { + int ret = 1; + [historyController.repository outputForArguments:[NSArray arrayWithObjects:@"update-ref", @"-d", [[sender ref] ref], nil] retValue: &ret]; + if (ret) { + NSLog(@"Removing ref failed!"); + return; + } + + [[sender commit] removeRef:[sender ref]]; + [commitController rearrangeObjects]; + } } - (void) checkoutRef:(PBRefMenuItem *)sender diff --git a/Site/Rakefile b/Site/Rakefile index cbad8c3..b225469 100644 --- a/Site/Rakefile +++ b/Site/Rakefile @@ -3,14 +3,16 @@ require 'erb' task :generate => [:generate_usermanual] do require 'rdiscount' + require 'lib/release_notes' + `rm -rf output` FileUtils.mkdir("output") `cat text/*.markdown > output/UserManual.markdown` `cp -r assets/* output` - template = ERB.new(File.read("template.html")) + template = ERB.new(File.read("templates/site.html")) - source = Dir.glob("text/*.markdown").each do |file| + Dir.glob("text/*.markdown").each do |file| contents = File.read(file) @body = Markdown.new(ERB.new(contents).result(binding)).to_html @filename = File.basename(file).gsub(/markdown$/,"html") @@ -48,6 +50,18 @@ task :generate_usermanual do end end +task :generate_appcast do + require 'lib/release_notes.rb' + require 'rdiscount' + FileUtils.mkdir_p("output/Downloads") + template = ERB.new(File.read("templates/sparkle.xml")) + + filename = ENV["STABLE"] ? "appcast.xml" : "appcast_DEBUG.xml" + File.open("output/Downloads/#{filename}", "w") do |f| + f.puts template.result(binding) + end +end + task :upload do `rsync -a output/ sydney:public_html/gitx/` end \ No newline at end of file diff --git a/Site/assets/Downloads/appcast.xml b/Site/assets/Downloads/appcast.xml deleted file mode 100644 index 66caa12..0000000 --- a/Site/assets/Downloads/appcast.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - GitX - http://github.com/pieter/gitx/wikis - A more native clone of Gitk for OS X - - - - GitX 0.6.1 - Thu, 29 Jan 2009 23:54:01 GMT - - - GitX 0.6.1 -
-

This is a bugfix release. The following bugs have been fixed:

- -
    -
  • The commit view shows new files with linebreaks
  • -
  • The history view works with Git >= 1.5.4 again
  • -
  • Reloading the detailed view in the History no longer causes an empty page
  • -
- -

Version 0.6 has the following new features and enhancements:

- -
    -
  • The diff display now looks much nicer, using boxes to segment files
  • -
  • The toolbar can now me customized
  • -
  • Images that have been changed or added in a commit can now be viewed - inline in GitX
  • -
  • GitX has gained a preference pane which allows you to specify a git path - and disable the Gist and Gravatar integration
  • -
  • The commit interface is now more intuitive. Particularly, you can now - select multiple files and use drag and drop to stage / unstage files
  • -
  • You can now drag and drop files out of the commit view
  • -
  • The files in the commit view have gained a context menu that allows you - to revert changes / open the file / ignore the file
  • -
  • It is now possible to adjust the amount of context lines in the commit view. - Using a smaller context size allows you to do more fine-grained commits
  • -
  • The branch menu is now organized in branches/remotes/tags
  • -
  • The view switch button now uses icons rather than words
  • -
  • The view shortcuts have changed to use command 1/2 for the history/commit - view. The history’s subviews can now be changed using command-option-1/2/3
  • -
  • Listing commits has become much faster
  • -
  • GitX no longer spawns zombie processes
  • -
  • GitX now shows a list of files that have been changed in a commit
  • -
  • GitX now uses libgit2 to store object id’s, reducing it’s memory footprint
  • -
- -

In addition many bugs were fixed, including the correct calculation of a - gravatar MD5 hash.

-
- ]]> -
-
- -
-
diff --git a/Site/lib/release_notes.rb b/Site/lib/release_notes.rb new file mode 100644 index 0000000..8ff598b --- /dev/null +++ b/Site/lib/release_notes.rb @@ -0,0 +1,50 @@ +#!/usr/bin/ruby + +RELEASE_NOTES_PATH = File.join(File.dirname(__FILE__), "..", "..", "Documentation", "ReleaseNotes") + +module ReleaseNotes + + VERSION_MATCH = /v([0-9.]*).txt$/ + + # Find all release not files + def self.release_files + notes = Dir.glob(File.join(RELEASE_NOTES_PATH, "v*.txt")) + + # Sort files by version number + notes.sort do |x,y| + x = x.match VERSION_MATCH + y = y.match VERSION_MATCH + # Puts nonmatching files at the bottom + if !x && y + 1 + elsif !y && x + -1 + else + # compare version strings, newest at the top + y[1].split(".").map { |a| a.to_i } <=> x[1].split(".").map { |a| a.to_i } + end + end + end + + # Aggregate all release notes in a string + def self.aggregate_notes + file = "" + release_files.each do |x| + file << File.read(x) + file << "\n" + end + file + end + + def self.last_version + last_file = release_files.first + if last_file =~ VERSION_MATCH + return $1 + end + nil + end + + def self.last_notes + File.read(release_files.first) + end +end \ No newline at end of file diff --git a/Site/template.html b/Site/templates/site.html similarity index 100% rename from Site/template.html rename to Site/templates/site.html diff --git a/Site/templates/sparkle.xml b/Site/templates/sparkle.xml new file mode 100644 index 0000000..0f44e31 --- /dev/null +++ b/Site/templates/sparkle.xml @@ -0,0 +1,29 @@ + + + + GitX + http://github.com/pieter/gitx/wikis + A more native clone of Gitk for OS X + + + + GitX <%= ReleaseNotes::last_version %> + Thu, 29 Jan 2009 23:54:01 GMT + + + + body { + font-size: 70%; + } + h1 { + font-size: 160%; + } + + <%= Markdown.new(ReleaseNotes::last_notes).to_html %> + ]]> + + + + + diff --git a/Site/text/index.markdown b/Site/text/index.markdown index cd56c8b..c8bea36 100644 --- a/Site/text/index.markdown +++ b/Site/text/index.markdown @@ -2,7 +2,7 @@
Download GitX -
Version 0.6.1
+
Version <%= ReleaseNotes::last_version %>
@@ -37,7 +37,7 @@ then in silky smooth OS X style!

Download

- The newest version of GitX is 0.6.1. This version can be downloaded from here. To see what has changed, read the Release History. + The newest version of GitX is <%= ReleaseNotes::last_version %>. This version can be downloaded from here. To see what has changed, read the Release History.

After you have started it once, you can install the command-line tool through the menu (GitX->Enable Terminal Usage…). This will install a “gitx” binary in /usr/local/bin. diff --git a/Site/text/release_history.markdown b/Site/text/release_history.markdown index 9b95961..1909539 100644 --- a/Site/text/release_history.markdown +++ b/Site/text/release_history.markdown @@ -3,105 +3,4 @@ Release history -### Changes in v0.6.1: - -This is a bugfix release. The following bugs have been fixed: - -* The commit view shows new files with linebreaks -* The history view works with Git >= 1.5.4 again -* Reloading the detailed view in the History no longer causes an empty page - -### Changes in v0.6 - -This release has the following new features and enhancements: - -* The diff display now looks much nicer, using boxes to segment files -* The toolbar can now me customized -* Images that have been changed or added in a commit can now be viewed - inline in GitX -* GitX has gained a preference pane which allows you to specify a git path - and disable the Gist and Gravatar integration -* The commit interface is now more intuitive. Particularly, you can now - select multiple files and use drag and drop to stage / unstage files -* You can now drag and drop files out of the commit view -* The files in the commit view have gained a context menu that allows you - to revert changes / open the file / ignore the file -* It is now possible to adjust the amount of context lines in the commit view. - Using a smaller context size allows you to do more fine-grained commits -* The branch menu is now organized in branches/remotes/tags -* The view switch button now uses icons rather than words -* The view shortcuts have changed to use command 1/2 for the history/commit - view. The history's subviews can now be changed using command-option-1/2/3 -* Listing commits has become much faster -* GitX no longer spawns zombie processes -* GitX now shows a list of files that have been changed in a commit -* GitX now uses libgit2 to store object id's, reducing it's memory footprint - -In addition many bugs were fixed, including the correct calculation of a -gravatar MD5 hash. - -### Changes in v0.5 - -This feature release has several new smaller or larger features: - -* The current branch is now highlighted -* In the commit view, there is an option to amend commits -* The "Gist it" button now respects github.user/token -* Display a gravatar of the committer -* The commit message view now displays a vertical line at 50 characters -* It is now possible to revert changes by using the context menu in the - commit view -* You can now stage only parts of a file by using the "Stage Hunk" buttons - in the commit view -* You can now use GitX to show a diff of anything, for example by using - 'gitx --diff HEAD^^' or 'git diff HEAD~3 | gitx --diff' -* You can now drag and drop refs to move them and also create branches - -In addition, the following bugs have been fixed: - -* Better detection of git version -* Branch lines are no longer interspersed with half a pixel of whitespace -* The toolbar keeps its state when switching views - -

Changes in v0.4.1:

- -

Changes in v0.4:

- -

Changes in v0.3:

- - -

Changes in v0.2.1:

- -

Changes in v0.2

- +<%= ReleaseNotes::aggregate_notes %> \ No newline at end of file