From 7b2efe1ac2bb48c01d31b98ae61c5b8d80d5087c Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Fri, 12 Sep 2008 14:47:06 +0200 Subject: [PATCH] Change current document when called with different arguments --- PBGitRepository.h | 2 +- PBRepositoryDocumentController.m | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PBGitRepository.h b/PBGitRepository.h index 5063a3d..032f094 100644 --- a/PBGitRepository.h +++ b/PBGitRepository.h @@ -34,7 +34,7 @@ extern NSString* PBGitRepositoryErrorDomain; - (id) initWithURL: (NSURL*) path andArguments:(NSArray*) array; -@property (readonly) PBGitRevList* revisionList; +@property (retain) PBGitRevList* revisionList; @property (assign) NSArray* branches; @property (assign) NSString* currentBranch; @property (assign) NSDictionary* refs; diff --git a/PBRepositoryDocumentController.m b/PBRepositoryDocumentController.m index 11e908c..136f52e 100644 --- a/PBRepositoryDocumentController.m +++ b/PBRepositoryDocumentController.m @@ -8,6 +8,7 @@ #import "PBRepositoryDocumentController.h" #import "PBGitRepository.h" +#import "PBGitRevList.h" @implementation PBRepositoryDocumentController // This method is overridden to configure the open panel to only allow @@ -38,7 +39,8 @@ [self addDocument:document]; [document makeWindowControllers]; } else { - // TODO: Add another revwalk specifier and show that. + // TODO: Use a more decent approach for this + [document setValue: [[PBGitRevList alloc] initWithRepository:document andRevListParameters: args] forKey:@"revisionList"]; } [document showWindows]; return document;