Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added delete file/s in context menu in Commit view. #95

Open
wants to merge 237 commits into
from

Conversation

Projects
None yet

andreberg and others added some commits Oct 20, 2009

@andreberg andreberg Bug fix: Context lines slider can now update diff views in real time.
NOTE: Using this feature needs cookies enabled, which may sub-optimal in
corporate controlled environments.

TODO: The dependency on jQuery is overkill for something as simple as
updating tracking mouse-ups on a input element.
a7ce2ab
@andreberg andreberg Bug fix: Change improper usage of dot notation.
Calling methods which are not properties through use of dot notation is a
no-no in Apple's Objective-C 2.0 documentation. According to Apple it might
work but the compiler will not warn about any dangerous use cases.

The prominent example from the docs of how not to do it is "someObject.retain".

Here retain is a method and not a property so proper use is "[someObject retain]".
Unfortunately, often it is not clear if something in the API is merely an accessor
or a method which acts like an accessor but does more than the name might imply.

In this case, we can see this in PBEasyPipe where we have method calls like
"NSTask.standardOutput = ...". Even though they may look correct this can be
dangerous for obvious reasons. I assume hat this could also play a role in the appearance
of the "bad file descriptor" messages.
6c04aea
@andreberg andreberg Bug fix: Increase width of Amend text label.
This text label was sometimes cut off half in the last char depending on
system font sizes.
08284e9
@andreberg andreberg Xcode project update: Change base SDK and deployement target to 10.6.
Change default compiler to Clang v1.0 for up to 40% compile and runtime
speed increase.

Improve control over install location through user scripts and config
files.
dca051c
@andreberg andreberg Bug fix: Make QuickLook panel work by using the now public API.
Also implements Finder's fade transitions, handles preview icon creation
through GCD block dispatch and does the right thing regarding events:
Mouse events go to the panel, key events to the fileBrowser outline view.
75e8a5b
@andreberg andreberg Bug fix: Various smaller fixes regarding GC, dot notation, etc... 380973b
@andreberg andreberg Lower the fade and timeout interval for the context range slider. 87df0b1
@andreberg andreberg Bug fix: small error in rsync detection between MacPorts and builtin. 0cfc5b1
@andreberg andreberg Bug fix: the QuickLook panel now really starts its nice morphing anim…
…ation from the selected row.

Previously it would just start from the top of the file browser outline view
every single time. Not very sexy...
76298f1
@andreberg andreberg Xcode project update. Just a small build name change e936253
@hardkrash @andreberg hardkrash + andreberg Adding relitive dates to history view
This is not all that sortable as 1 year will sort before 2 minutes.

To fix this the sorter on the table would neet to learn about units of
time.
4f7e155
@leachbj @andreberg leachbj + andreberg Unescape the filename to ensure that filenames containing '&' are dis…
…played correctly
93f1ea0
@hardkrash @andreberg hardkrash + andreberg Added weeks to the strings of time. c13474e
@niw @andreberg niw + andreberg FIX: memory leak(delete will not be called) and graph glitch
* When we are using subtree merge on git repository,
  GitX may show the slipped graph line.
* Behind this glitch, GitX may leak the PBGitLane object.
003977d
@niw @andreberg niw + andreberg FIX: bug 73fcb78
@rastersize @andreberg rastersize + andreberg Add on window selection refresh.
The changes in PBViewController is only there to
supress a compiler warning.
11cc30b
@andreberg @andreberg andreberg + andreberg Xcode build name again. Just ignore it. fcbe01b
@andreberg andreberg Merge branch 'ab/fqueue_stage' into devel 350be10
@andreberg andreberg Add missing changes for commit 11cc30 from rastersize's fork c76c922
@andreberg andreberg Merge branch 'ab/fqueue_stage' into devel 286b727
@andreberg andreberg Bug fix: Change notification to avoid display freezes when the QuickL…
…ook panel hides during the repository window's auto refresh.
7bf4ed5
@andreberg andreberg Merge branch 'fqueue' into devel 0df2d3f
@andreberg andreberg Add 10.6 delegate protocols to silence compiler warnings.
The net result is the same as of 10.5 when those were informal categories on NSObject.
75abf03
@andreberg andreberg Update checkbox buttons to non scaling to get rid of the XIB compiler…
… warnings.
fed2cc4
@andreberg andreberg Add stderr to PBEasyPipe output for helpful messages to Console. a2ebc4a
@andreberg Morgan Schweers + andreberg Use the newer libgit2 method for extracting a hex digest from an obje…
…ct id.
611687e
@andreberg Morgan Schweers + andreberg Use the libgit2 allocfmt method, instead of hacking it by hand. fa929eb
@andreberg Morgan Schweers + andreberg Add a menu item and an action for pushing a repo up. cdc4f52
@andreberg Morgan Schweers + andreberg Disable the push menu item for branches which don't have a remote. 4b74a3f
@andreberg Morgan Schweers + andreberg DRY up the menu adding code
Add rebase and pull menu items
Get upstream name more git-accurately for upstream operations
b580c03
@andreberg andreberg Add menu and toolbar changes from cyberfox 2b0000c
@andreberg Morgan Schweers + andreberg Rudimentary clone capability from the File menu.
No progress display, so it's UX sucks, but it works.

Need to add a progress display, so the user knows it's not just lost in the weeds.  Either a neutral 'working' progress bar, or (optimally) some cool thing that feeds off the pipe and fills a text display.
5b0051e
@andreberg Morgan Schweers + andreberg Disable toolbar entries when they are processing, as at least some mi…
…nimal feedback for the user. I still think it needs a progress bar dialog, or something.
7eb3616
@andreberg Morgan Schweers + andreberg Update the submodule to point to the actual libgit2 repository. 3c113a3
@andreberg andreberg Add alternative icons for Rebase, Push and Pull. b7ec771
@andreberg andreberg Update menu entry title to better match rest: 'Detailed View' -> 'Det…
…ail View'.
e80bcef
@andreberg andreberg Remove superfluous resources and underutilized localizations. d4a7df1
@andreberg andreberg Disable 'Save' menu item if no document is open. 7d19e1c
@andreberg andreberg Combine scatterred error domains and codes into one central file. fb0fbff
@andreberg andreberg Add sanity check to PBEasyPipe that checks if a working dir really is…
… a folder.
5be7451
@andreberg andreberg Synthesize repositoryPath for external access. 2a6f59b
@andreberg andreberg Loading message restricted to DEBUG_BUILD. 1fed883
@andreberg andreberg Exert other options before falling back to PBGitRepository's global s…
…tate.
d5688db
@andreberg andreberg Add pullButton: IBAction. 7c1b9d9
@andreberg andreberg Override openDocumentWithContentsOfURL:... to provide sanity checks f…
…or the case when a recent items entry no longer has a git repo associated with it. GitX fails gracefully and displays a recovery suggestion.
0d42c59
@andreberg andreberg Add new PNG templates for Pull, Push, Rebase and Clone. 4396081
@andreberg andreberg Update toolbars to incorporate the new buttons.
Update inherent height of branch popup button to the max height to get rid of the 1px movement between view change.
Remove another unused localization.
7892ac4
@andreberg andreberg Safety measure: Replace unneeded stringWithFormat with stringWithStri…
…ng because the format string is the content string.
b76f755
@andreberg andreberg Bug fix: Wrong usage of dot notation. 421d6fd
@andreberg andreberg Bug fix: Make new buttons actually work.
Mind you, these buttons cannot operate on the clicked branch like the context menu. 
Instead they always operate on the currently active branch (or its default remote).
93a027c
@andreberg andreberg Bug fix: reconnect the search field predicates so the field works again. 0f50cd6
@andreberg andreberg Filter debug log output by getenv adressable Xcode environment vars. 2cc3c73
@andreberg andreberg Update tooltips for Push, Pull and Rebase buttons to better reflect w…
…hat will happen.
d04c639
@andreberg andreberg Update PBGitErrors to include some error messages dealing with missin…
…g remote tracking branches.

This is especially useful for the new button functionality.
4c4203a
@andreberg @andreberg andreberg + andreberg Improve error and tooltip descriptions. f1fcb18
@andreberg andreberg Update context menu to include remote target and other dynamic title …
…changes.

When right-clicking on a ref label, if the ref has a default remote configured , 
a new greyed out menu entry with the remote's name is put above all other menu
entries and separated by a menu item separator.
1551084
@brotherbard brotherbard PBRefController: Switch the app modal Delete Remote panel to a window…
… modal sheet.
9e72dba
@brotherbard brotherbard Fix finding the correct contextual menu when Subject is not the first…
… column in the git history table.
d8f27db
@brotherbard brotherbard Add name of branch/remote to Checkout and Delete contextual menu items. f97cfbb
@brotherbard brotherbard Update the current branch when changes are made (like checking out a …
…branch).
2b45994

andreberg and others added some commits Apr 5, 2010

@andreberg andreberg Add new Error constants to PBGitXErrors, mostly for CLI support bc44ebf
@andreberg andreberg 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.
3f7b662
@andreberg andreberg Declare sidebarController property as __weak in PBGitWindowController.
Add some more (__ weak) properties which hold the other controller objects.
c85fa2f
@andreberg andreberg 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.
4ed7911
@andreberg andreberg Add a NSUserDefaultsDidChangeNotification listener to PBGitHistoryCon…
…troller.

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.
f704c99
@andreberg andreberg Only update selectedCommit in [PBGitHistoryController updateKeys] whe…
…n not nil.
1d4e4c5
@andreberg andreberg 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.
11688c9
@andreberg andreberg Add a check for hasPrefix:@"refs/" to isSimpleRef logic in PBGitRevSp…
…ecifier.
bee02b1
@andreberg andreberg 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.
8ddcc6c
@andreberg andreberg Add #import "BMScript.h" to PBSourceViewItem since it needs it for de…
…bugDescription.
f87cfa6
@andreberg andreberg 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.
10daa22
@andreberg andreberg Improving configuration of NSArrayController in PBGitHistoryView. d1474bd
@andreberg andreberg Remove debugging NSLog clutter and other left-over code. d54dca4
@fbartho fbartho Merge branch 'master' into fbartho bfb7149
@roddi roddi added missing delegate protocol declaration to remove warnings for 10.6 9a5efab
@dgrijalva dgrijalva 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
39ec231
@roddi roddi fixed warnings and analyser hits 535ef4e
@laullon laullon initial blame functionality fe31a90
@laullon laullon initial blame functionality on tree view 852006e
@laullon laullon HTML Blame 6d7a0a5
glaullon reload html 8a68343
glaullon highlight test 5ebb673
@laullon laullon SyntaxHighlighter functional a3a9173
@laullon laullon SyntaxHighlighter Object-C brush 1a4556e
glaullon source and diff view on history 1c3364d
glaullon scrollbar horizontal & toolbar class 81166cb
@laullon laullon MGScopeBar org verison 6e20f39
@laullon laullon Common file viewer for historic and commit views 26d9adc
@laullon laullon initial File log 3d123f7
@laullon laullon Merge commit 'refs/remotes/andreberg/master' into test_merge
Conflicts:
	ApplicationController.m
	GitX.xcodeproj/project.pbxproj
	PBGitHistoryView.xib
	PBGitTree.m
	PBViewController.m
1c350db
@laullon laullon merge end 34f5ed7
@laullon laullon Merge commit 'refs/remotes/roddi/sidebar' 5a7dd3f
@laullon laullon log work 8b357d4
@fbartho fbartho Merge in changes from brotherbard's work into my own branch.
Merge branch 'master' into fbartho

Conflicts:
	PBGitIndex.m
	html/views/history/history.js
fd47c99
@fbartho fbartho Changed regex for urlifying commit history views so that it now doesn…
…'t match selectors, now it will only match <protocol>://<rest of url>
3edd890
@fbartho fbartho Improved appearance of urls in commit history message. 3755c46
glaullon diff working 936a3b4
glaullon Merge remote branch 'refs/remotes/fbartho/fbartho' 9c75e6f
glaullon log commit link c73d759
@laullon laullon Better diff display 93803ce
@laullon laullon Config object to JavaScript 74ab910
@laullon laullon + glaullon only commit files on file view ed8ad4b
glaullon Only Commit / All Files b4f6ba2
glaullon cosmetic cdd011d
@laullon laullon merge to master d2c7cfc
@kballard kballard Add hidden preference to use a split column guide in commit messages
The conventional git commit message styling says to limit your first line
to roughly 50 characters, and subsequent lines to 76 characters. The column
guide in GitX doesn't support this.

Implement 2 new hidden preferences, one to determine whether it uses a split
column guide and the other to set the length of this guide. Default these
preferences to NO and 76, respectively. When the split column guide is
turned on, the drawing code will draw the normal column guide only for the
first line and it will use the split column guide length for every other
line.
6a81b7b
@kelan kelan Add diffstat info to the list of files in the commit view
Visual changes:
* Use a more structured table layout for the list of files.

Obj-C Code changes:
* Load the diffstat info with:
      $ git show --numstat -M --summary --pretty=raw $REV
  and then (as a 2nd, separate NSTask) load the full diff, with:
      $ git show --pretty=raw -M --no-color $REV
* A side-effect of this is that you now get a list of files changed in a
  merge commit, whereas it used to only show the commit message.

Javascript/HTML code changes:
* Get the commit view header info from the first task, so it should load
  quicker, especially for commits with really long diffs.
* Use the --numstat info (from the output of the first NSTask) to get the
  full list of files changed and the number of changed lines in each, and
  the --summary info to see if any files were created/deleted.
* Add a "prototype" of the file-list element in index.html, and then have the
  javascript extract then clone that, rather than building the elements
  totally in code.
* Add javascript functions to show/hide the lines added/removed details when
  the mouse hovers over the lines changed summary.
03ea45f
@kelan kelan Nicer style for the "long diff" message 753f3fb
@kelan kelan Add missing semicolons 2ebb924
@kelan kelan Fix contextual menu for files in new filelist
Also, better handle filenames with spaces
6ba1858
@kelan kelan Tweaked colors in new file list a bit
* Made the border color match the file diffs.
* Made the background color lighter and the text
  darker, so it's easier to read (and doesn't have
  the slight look of being disabled that it used
  to have).
* Changed the text shadow on the file names so it
  doesn't looks weird when overlapping a graph bar.
  In fact, now it helps readability in that case.
903e9db
@kamal kamal Add clickable commit SHAs in blame view 3b38beb
@kamal kamal Put SHA on same line as author 56a38e2
Daniel (dmilith) Dettlaff Merge branch 'experimental' of git://github.com/brotherbard/gitx into…
… experimental
e7823cc
Daniel (dmilith) Dettlaff Merge git://github.com/kamal/gitx into experimental 007a742
Daniel (dmilith) Dettlaff Merge git://github.com/kelan/gitx into experimental ae516b8
Daniel (dmilith) Dettlaff Merge git://github.com/kballard/gitx into experimental 455cf57
Daniel (dmilith) Dettlaff Implemented "delete" context command in stage view. 18f0ad7

+1, but I think this needs a rebase first :)

dmilith commented Feb 17, 2011

Just cherry pick it, and ignore my working branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment