Commit Graph

89 Commits

Author SHA1 Message Date
Pieter de Bie eeca836454 Also readBranches when opening as a NSDocument. 2008-08-18 22:26:34 +02:00
Pieter de Bie bcd6d88851 Merge commit 'ciaran/master'
* commit 'ciaran/master':
  Installation of the gitx command-line tool.
2008-08-18 22:04:13 +02:00
Pieter de Bie f786fe2b0b Read branches in a repository
This adds a -readBranches function which allows you to read in all
branches in our repository. It is used in the branch display popup box.
2008-08-18 22:03:41 +02:00
Ciarán Walsh 6f6b1e36db Installation of the gitx command-line tool.
We use ln(1) via AuthorizationExecuteWithPrivileges() to create a symlink to gitx in /usr/bin.
2008-08-18 20:49:45 +01:00
Ciarán Walsh 6d500bc310 Adding a message to inform the user that the terminal tool installation isn’t ready yet.
It also gives the user a command they can run to create the symlink manually.
2008-08-18 20:12:54 +01:00
Pieter de Bie 8d37228148 Merge commit 'ciaran/cli'
* commit 'ciaran/cli':
  Adding a menu item to install the CLI tool.
  The repository is owned by the window controller now, and PBWebGitController shouldn't need to use the ApplicationController
  The ApplicationController does not own a repository any more
  Amend the CLI tool to use the distributed objects system to try opening the current path when invoked.
  Overriding -documentForURL: to use +gitDirForURL: to convert incoming URLs to the .git dir before checking for an open document, so that open a repository from subdirectories won’t open duplicate windows.
  Separating out the logic for finding the .git dir for a given path in a repository, so it can be used in other places.
  Adding a basic command-line tool to interface with the application through distributed objects.
2008-08-18 20:44:22 +02:00
Ciarán Walsh 23a30ad259 Disabling diffs for the new xib file 2008-08-18 18:44:48 +01:00
Ciarán Walsh 3773a739b7 Adding a menu item to install the CLI tool. 2008-08-18 18:44:08 +01:00
Ciarán Walsh 7813dbfe54 The repository is owned by the window controller now, and PBWebGitController shouldn't need to use the ApplicationController 2008-08-18 18:29:41 +01:00
Ciarán Walsh d8dd74c59b The ApplicationController does not own a repository any more 2008-08-18 18:29:41 +01:00
Ciarán Walsh 4547d513d1 Amend the CLI tool to use the distributed objects system to try opening the current path when invoked.
When using the CLI tool (rather than a command using open(1)) it is now possible to open multiple repositores via the command-line.
2008-08-18 18:27:57 +01:00
Ciarán Walsh d600dded88 The repository is owned by the window controller now, and PBWebGitController shouldn't need to use the ApplicationController 2008-08-18 18:17:30 +01:00
Ciarán Walsh 07b6e826b4 The ApplicationController does not own a repository any more 2008-08-18 18:10:44 +01:00
Ciarán Walsh e015fd7be4 Overriding -documentForURL: to use +gitDirForURL: to convert incoming URLs to the .git dir before checking for an open document, so that open a repository from subdirectories won’t open duplicate windows. 2008-08-18 17:24:50 +01:00
Ciarán Walsh e5b2f0d2b9 Separating out the logic for finding the .git dir for a given path in a repository, so it can be used in other places. 2008-08-18 17:21:43 +01:00
Ciarán Walsh 0bb4cbc197 Adding a basic command-line tool to interface with the application through distributed objects.
Currently it simply launches the app and connects, however this will allow passing of arguments (for example, a revision to show).
2008-08-18 16:02:34 +01:00
Pieter de Bie 4c18f592f5 Fix 'commits loaded' label
The value binding of this label was lost after switching to a Document-based
view. This restores it.
2008-08-18 13:23:56 +02:00
Ciarán Walsh c90d48dd7b I had changed the usage of getenv("PWD") to use -[NSFileManager currentDirectoryPath], but this doesn’t work when opening GitX from the commandline.
So, this changes back to using $PWD (but through Cocoa instead, via NSProcessInfo)
2008-08-18 12:16:49 +01:00
Ciarán Walsh 5450d2c700 The tab buttons were connected to the setRawView: action, which meant that all buttons would switch to raw mode. The tab switching is done via a binding to selectedTab. 2008-08-18 12:07:06 +01:00
Ciarán Walsh 3998ffece2 Since we are using NSDocument now it’s best to use the document fileURL to store the .git path. 2008-08-18 08:58:47 +01:00
Ciarán Walsh b85a205698 Completing the document-based app setup.
Multiple repositories can now be opened by using the File → Open… menu option.
Each document is a PBGitRepository with a PBDetailController controlling the window. PBRepositoryDocumentController is the document controller.
When launched, the application will attempt to open a repository with the current directory as its path. If this fails it will display an open panel to allow the user to select one.
2008-08-18 08:58:39 +01:00
Ciarán Walsh 0def8d34d7 Splitting the window and it’s associated controllers into a separate nib; this will allow multiple repository windows to be used.
PBDetailController is the window controller, and now takes ownership of the repository so we can bind to it through File’s Owner in the nib file. Currently the ApplicationController creates a new PBDetailController at startup with the opened repository.
2008-08-18 07:31:39 +01:00
Ciarán Walsh 18e2a519b3 Force activation of the application after launch in debug builds.
This is required when running with TextMate’s Build & Run command, as the application is opened in the background.
2008-08-17 21:16:45 +01:00
Ciarán Walsh 45addc1f47 Setting up the Info.plist for a document-based application. PBGitRepository will be our document class. 2008-08-17 21:05:01 +01:00
Ciarán Walsh 8a4d5f2a34 Adding some more ignores 2008-08-17 20:53:25 +01:00
dbr 8eb76f1386 Add Rakefile tasks for (un)install
Added Rakefile that does install and uninstall.

Also providded are sub-tasks that do things like build GitX, copy it to
~/Applications/ or /Applications/, cleaning the build and removing GitX.app

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
2008-08-14 20:57:29 +02:00
Pieter de Bie 2e3a79af4a Fix compilation warnings 2008-06-21 14:06:04 +02:00
Pieter de Bie 17df4e808a PBGitRepository: search for git binary on more paths 2008-06-21 14:05:55 +02:00
Pieter de Bie 42c038ba49 Build: Rename last GitTest files to GitX
Some flags in the Debug target still weren't renamed. This caused compilation
problems.
2008-06-21 13:51:08 +02:00
Pieter de Bie fcfc4b9685 Add a README and license file 2008-06-21 13:30:57 +02:00
Jean-Paul van Oosten e95cef4248 Renamed the "doetHet" function to loadCommit 2008-06-18 22:49:00 +02:00
Jean-Paul van Oosten edc3ceadac WebView now scrolls to the top on update
Just added a call to the scroll-function in commit.js.
2008-06-18 22:49:00 +02:00
Pieter de Bie 727703c2f1 PBGitRevList: Fix parsing of date
This slipped in when adding parent collecting.. oops
2008-06-18 01:12:39 +02:00
Pieter de Bie ede8892dc9 PBGitRepository: Abstract revision walking to new class PBGitRevList
The revision walking code made the PBGitRepository unclean. Especially if
we want to keep multiple PBGitRepository objects around (e.g. persistent
data store), it needs to be more simple. This neatly extracts the revision
walking code from the repository code.
2008-06-17 19:32:38 +02:00
Pieter de Bie 447a8dc48c PBGitRepository: Also request parents when doing our revwalk
This is necessary for cool graph displaying, to be made.
2008-06-17 19:18:40 +02:00
Pieter de Bie 7555b1fa04 PBWebGit: Fix display of commit message when there is no diff
This happens for example in conflictless merge commits.
2008-06-17 16:59:22 +02:00
Pieter de Bie b8b92e6aaf PBWebGit: escape diff before inserting it into to the view
We used to escape a diff only after it was formatted. This would cause
some elements to hang the interface (like an iFrame)
2008-06-17 15:58:17 +02:00
Pieter de Bie 60db4c4e33 Make the revlist parsing more robust
This uses an NSMutableArray to increase the currentLine if the buffer is
full. This prevents very long messages from breaking the parsing.
If we cannot parse the log line, simple ignore it.
2008-06-17 15:56:54 +02:00
Pieter de Bie dcd8369ade Disable Gitk tree-like view for now.
This is not complete and perhaps should not have been committed. However,
.xib files being what they are, rewriting history or merging is getting
very difficult so I'll just disable it for now.

If anyone wants to take a look at this: we should probably do some rev-parsing
to create a graph representation in ApplicationController. That class already
is a delegate for our table and can tell individual cells what to display.

There we should tell how many lines to draw, what color, if there are merges
or splitoffs etc.
2008-06-17 15:20:55 +02:00
Pieter de Bie 39797876fe Optimize rev-list parsing
This uses the C fgets() over the weird readLine implementation I found.
It speeds up the rev-parsing significantly: we went from ~4.5 seconds
on the git.git repo to ~0.95 seconds. And that's with the secret new date
parsing!
2008-06-17 15:04:49 +02:00
Pieter de Bie aa3f720129 Merge commit 'HEAD@{1}'
* commit 'HEAD@{1}':
  Fix bug in encoding parsing
2008-06-17 13:59:29 +02:00
Pieter de Bie ecd4ce4aff Fix bug in encoding parsing
If a commit had invalid UTF-8 characters in them -- like one in git.git for
example -- then the revparsing would stop halfway through. This patch first
tries UTF-8 enconding, and if that fails, falls back to ASCII encoding.
2008-06-17 13:59:20 +02:00
Pieter de Bie fe8f173360 Add custom cell 2008-06-17 13:46:18 +02:00
Pieter de Bie e72d93c872 Allow dragging of files out of tree view
This uses the promisedfile protocol, which means that dragging to e.g.
FileMerge won't work.
2008-06-17 09:29:52 +02:00
Pieter de Bie e2b507313b Delete temporary files when they are deallocated
This will remove a lot of the stray files in the
temporary dir. However, they won't be deleted on exit
of the program. What to do about this?
2008-06-17 05:56:00 +02:00
Pieter de Bie b18b957190 Allow QuickLook to activate by pressing space
Subclasses NSOutlineView to PBQLOutlineView that takes a controller which
should respond to toggleQuickLook:. This is used for our tree walker to
actually show QuickLook when space is pressed.
2008-06-17 02:55:49 +02:00
Pieter de Bie 28e8bacb89 Add QuickLook support in tree view
This adds a QuickLook button that will allow you to directly view any file in
the tree view in QuickLook. This is really nice for PDF's and images. You can
select multiple files and even play a slideshow if you want.

Currently it does not remove temporary files it created. This means that they
will probably stay around until you reboot.
2008-06-17 02:29:27 +02:00
Pieter de Bie b62e92ad7f Treat MainMenu.xib as binary 2008-06-16 14:25:55 +02:00
Pieter de Bie cc6ac22047 Allow double click to open file 2008-06-16 14:19:38 +02:00
Pieter de Bie 7cdfdf0954 Use UTF-8 for data decoding 2008-06-16 05:31:12 +02:00