Commit Graph

140 Commits

Author SHA1 Message Date
German Laullon f9ccf1fe8d Solved compilation warnings 2011-03-10 16:04:45 -08:00
German Laullom 2de41fd116 Merge remote branch 'refs/remotes/rastersize/master' into experimental
Conflicts:
	PBGitRepository.h
	PBGitSidebarController.m
	PBSourceViewCell.h
	PBSourceViewCell.m
2011-01-27 16:45:11 -08:00
German Laullon 5c9d7163e1 badge system recoded 2011-01-07 12:10:44 -08:00
German Laullon 8249c9605d error control on branch counters 2011-01-06 00:03:21 -08:00
German Laullon 526f246896 correct branch ahead/behind counters 2011-01-05 23:37:16 -08:00
German Laullom c90c8a722b Merge remote branch 'refs/remotes/hungmac/svn-stashes' into experimental
Conflicts:
	PBGitRepository.h
	PBGitSidebarController.m
	PBSourceViewCell.h
	PBSourceViewCell.m
2011-01-05 13:57:12 -08:00
Adi Luhung Suryadi 13a4fd693f merging krasnyk/stashes branch to soundevolution/svn
Merge branch 'refs/heads/stashes' into testing

Conflicts:
	GitX.xcodeproj/project.pbxproj
	PBGitHistoryView.xib
	PBGitSidebarView.xib
2011-01-06 01:48:19 +08:00
Adi Luhung Suryadi a3bba2e19c Merge commit '0a3b60066c0662c4097e2d1db22e95fb1080abb9' into testing
Conflicts:
	GitX.xcodeproj/project.pbxproj
2011-01-06 01:09:16 +08:00
German Laullon 0bd684791d Branch commit ahead/behind values 2011-01-04 23:59:32 -08:00
Tomasz Krasnyk be507c8230 - Added controller 4 stashes, submodules, reset management
- Added additional menu for the repository actions
- Added action for 'Revealing in Finder'
2010-11-28 00:41:27 +01:00
Tomasz Krasnyk cc5c93c2b6 - stashes can be created with optional message
- added clearing all stashes
- added possibility to ignore files with given extension
- submodules are now showed
- submodules can be opened
2010-11-07 23:37:41 +01:00
krt 0a3b60066c Stashes are shown on in Side controlle 2010-11-06 13:20:13 +01:00
Matt Connolly be0716ad0d Adding code to do "git svn fetch/rebase/dcommit" 2010-10-26 06:35:14 +10:00
Matt Connolly be373b0ace Adding code to support SVN fetch,rebase,dcommit buttons and sensing of svn-remote configuration in repository. No implementation of git svn commands yet, just code for the buttons. 2010-10-22 07:01:55 +10:00
Nathan Kinsinger d00dbe42b3 Always pull all tracking branches from the remote
'git pull remote branch' will not update the remote's tracking branches, only the selected local branch. It may not be readily apparent that this happened. So remove the cases where GitX would pull just a single branch and always pull all the tracking branches.

The current checked out branch will still be updated as normal.
2010-09-19 22:51:14 -06:00
Nathan Kinsinger f4a6d3fe0b Set the working directory for arguments sent from the cli
This allows running the gitx cli in a subdirectory and specifying file paths in that directory without having to type out the full path.
2010-09-17 23:45:19 -06:00
Nathan Kinsinger e56ca103ca Add search commands to the gitx cli
-s or --search= for searching in subject, author or SHA
-S or --Search= for git's pickaxe string matching
-r or --regex= for git's pickaxe regex matching
2010-09-12 19:32:47 -06:00
Nathan Kinsinger e60bb3226c Refactor the gitx CLI to use apple events and the scripting bridge
Sending the arguments with the openURL:... message allows the repository document to modify it's UI without the UI flashing between states as it opens.

Covers all the existing functionality of the CLI, but modifies:
    - "--all" "--local" "--branch" change the branch filter
    - cleaned up the usage (help) text and added info on missing commands
    - looks up the full ref name of refs so the name of a branch or tag can be entered (the user can enter "master" instead of "refs/heads/master")

Modified the History Controller to watch for and react to branch filter changes.

The GitX.h file is generated by the 'sdp' tool in a run script build phase called 'Generate Scripting Bridge Header' based on the content of GitX.sdef. It is used by the Scripting Bridge so that other apps (in this case the gitx CLI) can call Applescript commands on GitX in objective-c.
2010-09-12 19:32:19 -06:00
Nathan Kinsinger 2529c02814 Fix getting the correct git directory
If the path already includes the .git directory then rev-parse will return "." to mean the current directory.
2010-08-22 07:52:15 -06:00
Nathan Kinsinger 92a44542ae Fix crashes from NSInvalidArgumentException
This happens when running the gitx cli tool from a directory that does not contain a git repository.
2010-08-22 07:51:49 -06:00
Jan Weiß 28f4c49b48 Fixing compiler warnings. 2010-08-22 07:50:25 -06:00
Nathan Kinsinger a849424a46 Add a cleanup method to the history list.
The cleanup method cancels any background threads and removes KV observers when the repository document is closed.

Also removed KV observers that are no longer needed.
2010-07-04 09:46:15 -06:00
Nathan Kinsinger c17215e55e Create wrapper class around git_oid and use it
This is a convenience class to replace using NSStrings to store and compare SHAs. PBGitSHA has a much faster isEqual: function.

It is <NSCopying> compliant and implements isEqual: and hash so it can be used as a key in dictionaries.
2010-07-04 09:46:12 -06:00
ngu 83e7c42ab4 Highlight the current commit with an orange circle 2010-06-27 06:33:19 -06:00
André Berg 427409b1c9 Populate the revList if empty in -commitForSHA:
I found that at a few points logic was based on items from revList but
at that point in the execution the revList was always empty.
2010-06-27 06:30:47 -06:00
Nathan Kinsinger 46b6057ce1 Speed up commit's isOnSameBranch
Use the cached commit list to avoid asking git for the info. This is used to update GUI buttons and when opening the contextual menu so making it fast is important. It wasn't possible before because we weren't storing all the commits.
2010-03-13 22:16:47 -07:00
Nathan Kinsinger 4a8c524692 Add branch view filters to history scope bar
- filters for All, Local/Remote, and the selected branch
        - "Local" includes both branches and tags
        - "Remote" includes all branches from the same remote as the selected remote branch (i.e. not other remotes)

Changes to make the above work:
    - add a history list class between the repository and rev list
        - store a project rev list with all the commits from the project
        - use the project rev list to graph the history for individual branches when there have been no changes
        - use a different rev list to show non-simple revs (history of a file, revs from the gitx tool)
        - update the commits in chunks to a mutable array so the table view's array controller has less work to do
        - only update the project rev list from git when actually necessary
    - don't add the All Branches and Local Branches revs to the branches array
    - some changes related to forcing the project's rev list to update when changes are made
    - some changes related to not causing updates too often
    - store the selected filter in user defaults
    - when the graphing is done select the commit for the branch
2010-03-13 22:16:44 -07:00
Nathan Kinsinger c83f77801e Delete branches when the refs are deleted
In reloadRefs:
    - check for any branches that are no longer in the repo and delete them
        - except the detached HEAD and the "other" revs
    - send KVO notice for the refs ivar changing
    - get rid of the BOOL return value as it's not being used
    - get rid of the outdated comments
    - clean things up a bit
2010-03-13 22:16:40 -07:00
Nathan Kinsinger 1323638791 Add/modify convenience methods in PBRevSpecifier
- NSCopying
    - change isEqualTo: to isEqual: so that it works well with NSArray's (containsObject: and removeObject: will use isEqual: instead of pointer equality)
    - add hash to go with isEqual:
    - pre-calculate the isSimpleRef value. The rangeOf... methods are very slow and have a major effect on the tight loop in reloadRefs.
2010-03-13 22:16:34 -07:00
Nathan Kinsinger ef8fed6f4e Fix up the stage view's commit message text view
- stop the spelling error markers from being drawn over
    - allow undo/redo in the commit message view
2010-03-13 22:16:27 -07:00
Nathan Kinsinger 2321ec8c47 Add and delete refs from the source list view
Observe the branches array and update the sidebar when refs are added or deleted.

Sort new items based on the title.
2010-03-13 22:15:06 -07:00
Nathan Kinsinger d3d700a138 Add Clone To… to the File menu
Will clone an open repository to a folder. Opens a sheet with a custom accessory view that has a checkbox to allow creating a bare repo.
2010-03-13 12:52:44 -07:00
Nathan Kinsinger 4bcbf43dc4 Add convenience method for the repository's projectName
Update the displayName method to use it
2010-03-13 12:52:41 -07:00
Nathan Kinsinger fe5dddc681 Add Add Remote
- Add Remote in the Repository menu
    - an Add Remote Sheet
2010-03-13 12:52:33 -07:00
Nathan Kinsinger 6e405972e8 Add Push to the contextual menus for refs 2010-03-13 12:52:29 -07:00
Nathan Kinsinger 46e996f5c6 Add Pull to the contextual menus for refs 2010-03-13 12:52:26 -07:00
Nathan Kinsinger 4654dc105f Add Fetch to the contextual menus for refs 2010-03-13 12:52:22 -07:00
Nathan Kinsinger 55973b4aff Add convenience methods for remotes 2010-03-13 12:42:19 -07:00
Nathan Kinsinger 7eec230959 Add Rebase to the contextual menu for commits and refs 2010-03-13 12:42:10 -07:00
Nathan Kinsinger e50ddbc503 Add Cherry Pick to contextual menu for commits. 2010-03-13 12:42:06 -07:00
Nathan Kinsinger e2ccfe6fce Add Merge in the contextual menus for commits and refs 2010-03-13 12:42:02 -07:00
Nathan Kinsinger 8359883c92 Rename removeRef: to showDeleteRefSheet:
- move the core of the delete implementation to the repository as deleteRef:
    - move it to it's own pragma mark section
2010-03-13 12:41:56 -07:00
Nathan Kinsinger dceabb6702 Add Checkout Files to file browser contextual menu
Allows checking out the state of a file from any commit to the working directory.
2010-03-13 12:41:50 -07:00
Nathan Kinsinger 69d67820f6 Add Checkout
Checkout:
    - PBGitRepository: add checkoutRefish:
    - PBRefController: renamed checkoutRef: to checkout: and use new method in PBGitRepository
    - add to the contextual menus for commits (it was already in the menu for refs)
    - add "Checkout branch" checkbox to the Create Branch sheet
        - store the state in the defaults
    - tell the commitController to rearrangeObjects so that the refs highlight correctly (seems to only be a problem when going from a branch to a detached HEAD at the same commit)
2010-03-13 12:41:30 -07:00
Nathan Kinsinger aa4a24a579 Add Create Tag
A Create Tag item:
    - A new class (and xib) PBCreateTagSheet
    - In the Repository menu
    - In the contextual menu for commits

PBRefController the method tagInfo:
    - renamed to showTagInfoSheet:
    - moved it under the Tags mark
2010-03-13 12:41:24 -07:00
Nathan Kinsinger 9f048f6363 Update Create Branch
Update the methods for creating a branch.
    - create new class and xib PBCreateBranchSheet
    - remove old addRef: methods and iVars from PBRefController
    - remove old sheet from PBHistoryView.xib
    - put the implementation method in PBGitRepository
    - add a contextual menu item for commits
    - shows an error sheet
    - ask the commitController to rearrangeObjects to make sure the new branch is shown
    - switch from using "update-ref" to "branch" so that branches starting at a remote branch will track automatically (or not depending on the repo's settings)
2010-03-06 16:30:50 -07:00
Nathan Kinsinger b61028a06a Add support methods needed for future commits.
PBGitCommit
PBGitRevSpecifier
PBGitRepository
2010-03-06 15:56:54 -07:00
Nathan Kinsinger 1c4601dd52 PBGitConfig: Change name of -initWithRepository:
Better indicates the information needed and stops a compiler warning about wrong type (there are other initWithRepository: methods that take a different type).
2010-02-19 22:54:49 -07:00
Pieter de Bie fa6ff44d0b PBGitRepository: Clean up the readFromURL: method
We used a BOOL value which was returned afterwards,
but we might as well just return early and simplify everything
2009-06-20 21:33:22 +01:00
Benoit Cerrina fa6182e2a4 PBGitRepository: Fix opening of large directories due to bug in NSFileWrapper.
This commit changes  readFromFileWrapper:ofType:error: to readFromURL:ofType:error:.

The default implementation of readFromURL calls readFromFileWrapper, but a bug
in NSFileWrapper makes this fail with repositories with a large number of files
(not sure if the fact that those files were in subdirectories matter or not).

So instead we skip the whole FileWrapper thing, which we don't really use anyway,
and just use the URL.
2009-06-20 21:33:22 +01:00