Commit Graph

806 Commits

Author SHA1 Message Date
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 0c0b764005 Remote progress sheet
Add a progress sheet for remote operations that takes the arguments for a command and runs it in a task then shows a success or failure sheet.
2010-03-13 12:42:15 -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 859f77e718 Fix file names with spaces not working in the contextual menu
Files with spaces end up with 4 extra spaces after the name. This stops them from working with the various commands in the contextual menus.
2010-03-13 12:41:37 -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
Morgan Schweers ffa2e1aed4 Add stderror to the pipe results, so we can find out what happened when things go wrong. Not an optimal answer, but a quick one. 2010-03-13 12:41:11 -07:00
Nathan Kinsinger e43a87e3f8 Add Copy SHA and Copy Patch items to commit contextual menu 2010-03-06 16:32:48 -07:00
Nathan Kinsinger 509de29091 Add Reveal in Finder item to the Repository menu. 2010-03-06 16:31:51 -07:00
Nathan Kinsinger db0bb87340 Add Open in Terminal to the Repository menu.
Code came from B. Ohr at: http://groups.google.com/group/gitx/browse_thread/thread/a103df7ef7c1f037

Added quotes to workingDirectory path to support paths with spaces.
2010-03-06 16:31:16 -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 69c9c57397 Add convenience method for showing an error sheet. 2010-03-06 15:59:16 -07:00
Nathan Kinsinger 9b39d34af4 The revision cell returns a menu for the commit if it doesn't for a ref. 2010-03-06 15:58:58 -07:00
Nathan Kinsinger ff5f3f7979 Add methods dealing with menus needed for future features.
Switch from storing both the ref and the commit to storing just one or the other as a refish.

Change action methods that receive PBRefMenuItem to support the change in functionality. In particular the removeRefSheetDidEnd:returnCode:contextInfo: method in PBRefController now looks up the commit for the ref (this was the only place that needed both the ref and the commit).
2010-03-06 15:58:20 -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 39def32a1b Add <PBGitRefish> protocol.
This will simplify methods that execute git commands that can take a ref or an SHA.

Add some string constants so there is only one place for the type strings.
2010-02-19 22:55:07 -07:00
Nathan Kinsinger 771daa7a2c PBGitRef: add support methods that will be needed in future commits.
These add functionality and will improve readability.
2010-02-19 22:55:01 -07:00
Nathan Kinsinger 03dc7819b4 Disable Commit button when there are no staged files. 2010-02-19 22:54:55 -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
Nathan Kinsinger 370c1322c4 Add a space before the file name. 2010-02-19 22:54:43 -07:00
Nathan Kinsinger 76cd64c92b Fix for "Remote host closed connection" exception
EINTR errors are recoverable, just need to read() again.

Randomly while looking at files in the file browser the contents view will be empty or files will not be shown when clicking a discloser triangle. Seems to happen more when running in XCode than when running by itself.
2010-02-19 22:54:36 -07:00
Nathan Kinsinger 87f76fd5a1 Bugfix: fix the contextual menu and drag-n-drop of refs
When the Subject column is not the first column in the git history table the contextual menu for refs and dragging and dropping refs don't work.

Offset the mouse click's x value by the x origin of the Subject column.

In PBRefController look up the column index of the subject column and check that it's the clicked column (don't assume it's the first one).
2010-02-19 22:54:25 -07:00
Nathan Kinsinger cfcbec788a Switch "Discard changes" panel to a window modal sheet 2010-02-19 22:53:38 -07:00
Nathan Kinsinger c0744f19ec Switch "Discard Hunk" panel to a window modal sheet 2010-02-19 22:28:00 -07:00
Nathan Kinsinger fbc1902764 Switch Delete Remote panel to a window modal sheet 2010-02-19 22:26:14 -07:00
Pieter de Bie a256210880 Testing: add missing file 2009-10-02 10:19:14 +02:00
Pieter de Bie 30621f13fc test/index: add more tests 2009-10-01 21:59:19 +02:00
Pieter de Bie a3f02b2902 GitIndex: fix status update when changed file is deleted
Fixes bug LH#209
2009-10-01 21:59:08 +02:00
Pieter de Bie 339026981a Update testing framework 2009-10-01 21:55:40 +02:00
Pieter de Bie 5be8aed2b7 GitIndex: increase refreshStatus before launching task
We used to increase this variable after
handing it over to the [handle readToEndOfFileInBackgroundAndNotify],
but sometimes a task would quit before getting to that point, causing
a premature index refresh event to be called.
2009-10-01 21:17:32 +02:00
Pieter de Bie ce89e0f468 Add first test, in MacRuby 2009-10-01 21:06:20 +02:00
Pieter de Bie f0860b4f9d Add testing framework 2009-10-01 21:06:09 +02:00
Pieter de Bie 1854fc0bd0 Merge branch 'pu/pb/index_refactor'
* pu/pb/index_refactor: (24 commits)
  PBGitIndex: post notifications when index stuff fails
  GitIndexController: reorder methods a bit, remove unnecessary stuff
  PBGitIndex: Migrate discardChanges to the GitIndex
  CommitController: Make commit message editable after commit failed
  GitIndex: Fix a few comments
  GitIndex: explicitly tell when stuff is updated
  Remove cruft
  Show previous commit message when amending
  CommitController: Empty commit title when commit is successful
  CommitView: Remove cruft
  Add failed commit notifications
  GitIndex: add commit notifications
  CommitController: Add status messages for index operations
  GitIndex: Add a few notifications
  CommitView: Migrate patch apply stuff to GitIndex
  GitIndex: Add support for applying patches
  CommitController: Replace commit method with the one from GitIndex
  GitIndex: add basic commit method
  GitIndexController: Migrate stageFiles functions to GitIndex
  GitIndex: Add methods to stage and unstage files
  ...

Conflicts:
	PBGitCommitController.m
	PBGitIndexController.h
	PBGitIndexController.m
2009-09-17 23:47:43 +02:00
Pieter de Bie 1a5a211ddf Merge branch 'stable'
* stable:
  HistoryView: Don't show the 'loading commit' thing until after 500 ms.
  HistoryView: Remove raw view
  HistoryView: don't load in commit information in a separate thread anymore
  Fix UTF-8 bug in NSString_RegEx
  CommitView: Don't keep rearranging when iterating over files
  IndexController: de-privatize the index-stopping stuff
2009-09-17 23:43:34 +02:00
Pieter de Bie 5972bd4f7f HistoryView: Don't show the 'loading commit' thing until after 500 ms.
This was annoying me a lot, so it's in stable :)

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
2009-09-17 23:40:38 +02:00
Pieter de Bie 34394d056b HistoryView: Remove raw view
I don't think anybody has ever used this, so let's just remove it.
2009-09-17 23:32:35 +02:00
Pieter de Bie 0363eea494 HistoryView: don't load in commit information in a separate thread anymore
I've seen this hang or crash a few times, so I hope this works better.
Instead of running a task in a separate thread, we just let it go through
the run loop and catch it when the task is done.

This ruins the second subview in the history view, but I don't think
anybody ever used that, so I'm going to remove it.
2009-09-17 23:29:06 +02:00
Pieter de Bie 2cdf2b60f5 Merge branch 'pu/pb/index_quick_fix' into stable
* pu/pb/index_quick_fix:
  CommitView: Don't keep rearranging when iterating over files
  IndexController: de-privatize the index-stopping stuff
2009-09-14 15:09:03 +02:00
Pieter de Bie 3324591e6c Fix UTF-8 bug in NSString_RegEx
This class would use the location information provided by
regex(3) as range for for a substring. However, the information
regex(3) returns is a byte-based, while NSString works on characters.

This can cause a problem when there are UTF-8 characters in the string,
as the wrong subsstring will be returned.

This is fixed by taking the UTF bytesequence, and extracting a substring
from that, rather than using NSString's own substring method
2009-09-14 13:25:01 +02:00
Pieter de Bie a2b3bf3d1e PBGitIndex: post notifications when index stuff fails
We use notifications so that we can make all these methods async later on
2009-09-13 16:55:40 +02:00
Pieter de Bie 438a3f808d GitIndexController: reorder methods a bit, remove unnecessary stuff 2009-09-13 16:55:40 +02:00