Commit Graph

1091 Commits

Author SHA1 Message Date
glaullon c73d759ac8 log commit link 2010-06-16 09:00:00 -07:00
glaullon 9c75e6f765 Merge remote branch 'refs/remotes/fbartho/fbartho' 2010-06-16 06:55:21 -07:00
glaullon 936a3b4cae diff working 2010-06-15 20:17:07 -07:00
Frederic Barthelemy 3755c46edd Improved appearance of urls in commit history message. 2010-06-15 19:34:16 -07:00
Frederic Barthelemy 3edd89010f Changed regex for urlifying commit history views so that it now doesn't match selectors, now it will only match <protocol>://<rest of url> 2010-06-15 19:33:45 -07:00
Frederic Barthelemy fd47c991ed Merge in changes from brotherbard's work into my own branch.
Merge branch 'master' into fbartho

Conflicts:
	PBGitIndex.m
	html/views/history/history.js
2010-06-15 19:19:02 -07:00
German Laullon 8b357d40e9 log work 2010-06-15 08:54:22 -07:00
German Laullon 5a7dd3fac1 Merge commit 'refs/remotes/roddi/sidebar' 2010-06-14 17:02:04 -07:00
German Laullon 34f5ed7382 merge end 2010-06-14 16:55:22 -07:00
German Laullon 1c350dbcf9 Merge commit 'refs/remotes/andreberg/master' into test_merge
Conflicts:
	ApplicationController.m
	GitX.xcodeproj/project.pbxproj
	PBGitHistoryView.xib
	PBGitTree.m
	PBViewController.m
2010-06-14 16:39:06 -07:00
German Laullon 3d123f7fa3 initial File log 2010-06-14 15:59:16 -07:00
German Laullon 26d9adca8e Common file viewer for historic and commit views 2010-06-14 10:29:18 -07:00
German Laullon 6e20f39515 MGScopeBar org verison
http://mattgemmell.com/2008/10/28/mgscopebar
2010-06-13 16:03:29 -07:00
glaullon 81166cbbdb scrollbar horizontal & toolbar class 2010-06-11 16:31:35 -07:00
glaullon 1c3364dec9 source and diff view on history 2010-06-11 16:23:12 -07:00
German Laullon 1a4556e955 SyntaxHighlighter Object-C brush 2010-06-11 01:00:49 -07:00
German Laullon a3a9173b35 SyntaxHighlighter functional 2010-06-11 01:00:19 -07:00
glaullon 5ebb673840 highlight test 2010-06-10 21:54:45 -07:00
glaullon 8a683431de reload html 2010-06-10 21:11:02 -07:00
German Laullon 6d7a0a5e81 HTML Blame 2010-06-10 13:51:23 -07:00
German Laullon 852006ed22 initial blame functionality on tree view 2010-06-10 01:28:27 -07:00
German Laullon fe31a90233 initial blame functionality 2010-06-09 00:31:02 -07:00
Roddi 535ef4e93a fixed warnings and analyser hits 2010-06-08 19:03:55 +02:00
Dave Grijalva 39ec2319bf Merge commit 'brotherbard/experimental'
Conflicts:
	ApplicationController.m
	GitX.xcodeproj/project.pbxproj
	PBGitCommitView.xib
	PBGitHistoryView.xib
	PBGitWindowController.m
	PBViewController.m
	html/views/history/history.css
	html/views/history/history.js
2010-06-02 02:35:32 -07:00
Roddi 9a5efabba3 added missing delegate protocol declaration to remove warnings for 10.6 2010-05-17 16:51:53 +02:00
Frederic Barthelemy bfb71494fa Merge branch 'master' into fbartho 2010-05-04 14:50:46 -07:00
André Berg d54dca4f42 Remove debugging NSLog clutter and other left-over code. 2010-04-06 00:03:07 +02:00
André Berg d1474bd22a Improving configuration of NSArrayController in PBGitHistoryView. 2010-04-05 23:52:04 +02:00
André Berg 10daa222b5 Major overhaul of the handling/effect of CLI args (gitx/PBCLIProxy).
Since we now have that gorgeous sidebar and commit list with branch filters, 
command line arguments to gitx should utilize these to greater effect.

For example, if I pass:

"--local" >> read current branch and set the branch filter to "Local"
"--all" >> same as above but set "All" branch filter
- partial or full SHA-1 >> should get the branch most likely associated with 
that SHA, select it in the sidebar and scroll the commit list to the commit 
with the passed SHA.
- partial ref like "xyz/master" >> select the master branch
of the "xyz" folder in the sidebar and scroll the commit list to its most
recent commit.
"--subject=Test" >> filter commit list using a predicate on the commit list's 
array controller (basically populating the search field programmatically).
For other "--..." CLI switches it's the same, just the filter predicate is a 
bit different each time. You get the idea.

To accomplish this we make the following changes:

- gitx sets two environment variables via setenv(), one for a concatenated 
  version of the CLI args, and one for the indicator that we launched from gitx.
  Using setenv() is unfortunate but I couldn't find a way to do it through DO
  and PBCLIProxy since that proxy will do it's processing far too late into 
  the app's event cycle. 

- the now shared application controller stores the two env vars in a BOOL
  'launchedFromGitx' and an NSString 'cliArgs'.

- Because GitX makes heavy use of KVO and context switching during the app
  launch we introduce the notion of a deferred selection so that we can worry
  about selecting the branch and commit the user has passed to gitx in some 
  form or another, when the app has finished launching completely and all 
  KVO notifications up to this point have been handled.
  
- ApplicationController does the bulk work. It stores most state
  changes, handles most command line switches (except for a few still in gitx.m),
  deals with the deferredSelectObject.

- PBGitSidebarController populateList includes logic for fixing up a ref or 
  a partial SHA when appController.launchedFromGitx is true. If it can be
  resolved we set this as the deferred select object so it can be selected
  later on.

I'll leave the excess NSLogs in there for this commit so another can see
what went into this before.
2010-04-05 23:50:03 +02:00
André Berg f87cfa6900 Add #import "BMScript.h" to PBSourceViewItem since it needs it for debugDescription. 2010-04-05 23:00:48 +02:00
André Berg 8ddcc6c660 Add DO directional/value qualifier keywords to PBCLIProxy
Specifying these helps to improve DO performance and it should also help
with the NSURL passed byref thingy (see PBCLIProxy.m), although we don't
really need that anymore because we changed the parameters to be NSString's
which by default are passed bycopy.

Specifying "oneway void" creates a fire-and-forget situation where the 
distant object will not wait for the value returned.
2010-04-05 22:58:35 +02:00
André Berg bee02b18cf Add a check for hasPrefix:@"refs/" to isSimpleRef logic in PBGitRevSpecifier. 2010-04-05 22:51:33 +02:00
André Berg 11688c9319 If launched from CLI return immediately from observeValueForKeyPath...
in PBGitHistoryController, since this will prevent commit list selection
changes while a deferred selection is undergoing.

A deferred selection is processed when a launch from CLI occurrs with CLI
args containing strings like "<SHA>", or "--subject=<word>", etc. 
(see gitx.m).

What happens is that a 0.5s delayed selector will be performed from the 
ApplicationController after the CLI args where processed. After this has
happened, launchedFromGitx will be NO and thus KVO can continue as it 
normally would.
2010-04-05 21:34:00 +02:00
André Berg 1d4e4c554b Only update selectedCommit in [PBGitHistoryController updateKeys] when not nil. 2010-04-05 21:28:52 +02:00
André Berg f704c99fa8 Add a NSUserDefaultsDidChangeNotification listener to PBGitHistoryController.
Add method decl signatures for updateKeys and scrollSelectionToTopOfViewFrom:

- Call preferencesChangedWithNotification: on self when the notification is
received. This gives us the opportunity to refresh the history controller's
commit list in case defaults like the relative dates option have changed.
This makes the effect of switching that option while the prefs panel is still
open instant.
2010-04-05 21:27:45 +02:00
André Berg 4ed7911c6f Multiple changes to -selectCommit: from PBGitHistoryController.
- Change return type from void to BOOL to convey if selecting succeeded 
  or not.

- Return NO if the cliArgs from sharedApplicationController contain "--commit",
  since then we need to just show the commit stage. Updating the commit list
  selection is not necessary. In fact, it will confuse order among consequent 
  calls.

- If the oldIndex equals NSNotFound, try to get the index of the currently 
  selected object by finding it among the content object of the commitController.
  
  If we find it we save the result in an ivar called selectedCommit so that 
  subsequent calls will always have this available as an alternative back-up
  plan.
2010-04-05 21:24:00 +02:00
André Berg c85fa2f216 Declare sidebarController property as __weak in PBGitWindowController.
Add some more (__ weak) properties which hold the other controller objects.
2010-04-05 21:15:10 +02:00
André Berg 3f7b66284b Minor file layout changes to PBGitHistoryController.
- Rearrange some ivar declarations and bunch IBOutlets etc. together for better
  visual acuity.
- Add readonly properties for searchField, commitList and webView.
2010-04-05 21:12:48 +02:00
André Berg bc44ebfa01 Add new Error constants to PBGitXErrors, mostly for CLI support 2010-04-05 21:09:42 +02:00
André Berg 7761d2f06f Add shell script methods to PBGitRepository.
These use BMScript which may be overkill considering we have like a whole load 
of PBEasyPipe commands and their wrappers in the repository but I just found for
one or two tasks where I really had to work with a full featured shell script
PBEasyPipe was a bit limited.
2010-04-05 17:00:30 +02:00
André Berg 0c26fb5dde Remove launchedFromCLI ivar from PBGitRepository.
Purely cosmetic: rearrange some @synthesized directives.

State like this is now more appropriately managed by the ApplicationController.
2010-04-05 16:50:11 +02:00
André Berg 4b4912a57a Add some more checking/validation methods to PBGitRepository.
- Add a shaExists method that takes string with a SHA and either returns the full
  SHA if it exists or nil if not.
- Add a completeRefForString: method which completes partial refs like "xyz/master"
  to "refs/remotes/xyz/master" for example.
- Add a checkRefFormatForBranch: method which does the same as checkRefFormat 
  except it also works with partial branch refs like "xyz/master".
- Add headRefForSHA skeleton to encapsulate the shell-script-fu from populateList
  in PBGitSidebarController that deals with getting the head ref for a SHA.
2010-04-05 16:45:34 +02:00
André Berg 5cb73b4d42 Bug fix: correct visible index scrolling in PBGitHistoryController and PBCommitList.
If the current branch filter is switched to "All" or "Local" the index that's
calculated as being the targeted index to scroll to visible, is off by the amount
in Y that the bottom split view separator is off from a multiple of rows.

-adjustScroll: on PBCommitList is called automatically whenever the list needs 
laying out. 
An ivar keeps track if we come from the -scrollSelectionToTopOfViewFrom: method
of PBGitHistoryController.

I'll leave the commented out NSLogs in there in case they're needed for debugging
again later.
2010-04-05 16:32:59 +02:00
André Berg ba63642c87 Add a method declaration to PBGitRevSpecifier.h to silence a compiler warning. 2010-04-05 16:25:08 +02:00
André Berg 8df20db49d Add PBStringFromBranchFilterType() function for debugging purposes to PBGitRepository.
Add a PBGitXBranchFilterType typedef to the kGitX... branch filters enum.
2010-04-05 16:22:06 +02:00
André Berg 23a1ddd73b Remove a superfluous semicolon in PBCommitList.m 2010-04-05 16:15:54 +02:00
André Berg 8bc8a73e1b Put at-sign in front of multi-line continued string.
Probably doesn't matter since the compiler should concatenate both forms equally.
2010-04-05 16:12:11 +02:00
André Berg 69d23e9e08 Move Remote segmented controls from Sidebar to Repository window's top gradient bar.
Now, I know conceptually the Remotes segmented control was down there because it is
related to the repository and the current branch, but I really grew tired having to 
travel all the way down the monitor real estate just to click a button. 
And you can't just fast travel down, you need be quite specific with the click.
2010-04-05 15:52:01 +02:00
André Berg 93483cb9a9 Adjust the last two panels in Preferences.xib in width to match the first. 2010-04-05 14:14:46 +02:00
André Berg 85b2de9431 Disable hidden entries in MainMenu.xib/File and remove the saveAs: target connection. 2010-04-05 12:59:12 +02:00