From da6a75c60770260ed603b76c496b0b9a6b3a2b91 Mon Sep 17 00:00:00 2001 From: German Laullon Date: Thu, 9 Dec 2010 13:12:52 -0800 Subject: [PATCH] error control & and html/css/javascript reorder. --- GLFileView.m | 67 ++- GitX.xcodeproj/project.pbxproj | 1 - html/css/GitX.css | 17 + html/views/blame/blame.js | 12 +- html/views/blame/index copy.html | 726 ---------------------------- html/views/blame/index.html | 46 +- html/views/diff/diffWindow.css | 55 ++- html/views/diff/diffWindow.js | 17 +- html/views/diff/index.html | 34 +- html/views/fileview/fileview.js | 229 ++++----- html/views/fileview/index.html | 70 +-- html/views/fileview/index_test.html | 48 -- html/views/log/index.html | 34 +- html/views/log/log.js | 14 +- html/views/log/test.html | 200 -------- html/views/source/index.html | 1 + 16 files changed, 371 insertions(+), 1200 deletions(-) delete mode 100644 html/views/blame/index copy.html delete mode 100644 html/views/fileview/index_test.html delete mode 100644 html/views/log/test.html diff --git a/GLFileView.m b/GLFileView.m index 579bee9..bfc9ea0 100644 --- a/GLFileView.m +++ b/GLFileView.m @@ -101,17 +101,23 @@ NSString *fileTxt = @""; if(startFile==@"fileview"){ - fileTxt=[self parseHTML:[file textContents:&theError]]; + fileTxt=[file textContents:&theError]; + if(!theError) + fileTxt=[self parseHTML:fileTxt]; }else if(startFile==@"blame"){ - fileTxt=[self parseBlame:[file blame:&theError]]; + fileTxt=[file blame:&theError]; + if(!theError) + fileTxt=[self parseBlame:fileTxt]; }else if(startFile==@"log"){ fileTxt=[file log:logFormat error:&theError]; }else if(startFile==@"diff"){ fileTxt=[file diff:diffType error:&theError]; + if(!theError) + fileTxt=[self parseDiff:fileTxt]; } id script = [view windowScriptObject]; - if(theError==nil){ + if(!theError){ NSString *filePath = [file fullPath]; [script callWebScriptMethod:@"showFile" withArguments:[NSArray arrayWithObjects:fileTxt, filePath, nil]]; }else{ @@ -119,7 +125,7 @@ } } -#if 0 +#if 1 NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML]; NSString *tmpFile=@"~/tmp/test.html"; [dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil]; @@ -217,6 +223,59 @@ return txt; } +- (NSString *) parseDiff:(NSString *)txt +{ + txt=[self parseHTML:txt]; + + NSArray *lines = [txt componentsSeparatedByString:@"\n"]; + NSString *line; + NSMutableString *res=[NSMutableString string]; + + [res appendString:@""]; + int i=0; + while(i<[lines count]){ + line=[lines objectAtIndex:i]; + if([[line substringToIndex:2] isEqualToString:@"@@"]){ + + int l_int,l_count,l_line; + int r_int,r_count,r_line; + + NSString *header=[line substringFromIndex:3]; + NSRange hr = NSMakeRange(0, [header rangeOfString:@" @@"].location); + header=[header substringWithRange:hr]; + + NSArray *pos=[header componentsSeparatedByString:@" "]; + NSArray *pos_l=[[pos objectAtIndex:0] componentsSeparatedByString:@","]; + NSArray *pos_r=[[pos objectAtIndex:1] componentsSeparatedByString:@","]; + l_line=l_int=abs([[pos_l objectAtIndex:0]integerValue]); + l_count=[[pos_l objectAtIndex:1]integerValue]; + r_line=r_int=[[pos_r objectAtIndex:0]integerValue]; + r_count=[[pos_r objectAtIndex:1]integerValue]; + + [res appendString:[NSString stringWithFormat:@"",line]]; + + do{ + line=[lines objectAtIndex:++i]; + NSString *s=[line substringToIndex:1]; + line=[line substringFromIndex:1]; + + if([s isEqualToString:@" "]){ + [res appendString:[NSString stringWithFormat:@"",l_line++,r_line++]]; + }else if([s isEqualToString:@"-"]){ + [res appendString:[NSString stringWithFormat:@"",l_line++]]; + }else if([s isEqualToString:@"+"]){ + [res appendString:[NSString stringWithFormat:@"",r_line++]]; + } + [res appendString:[NSString stringWithFormat:@"",line]]; + }while(l_line<(l_int+l_count) && r_line<(r_int+r_count)); + + } + i++; + } + [res appendString:@"
%@
%d%d
%d
%d%@
"]; + return res; +} + - (NSString *) parseBlame:(NSString *)txt { txt=[self parseHTML:txt]; diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj index eab6697..b32a6aa 100644 --- a/GitX.xcodeproj/project.pbxproj +++ b/GitX.xcodeproj/project.pbxproj @@ -1158,7 +1158,6 @@ isa = PBXProject; buildConfigurationList = 26FC0A880875C7B200E6366F /* Build configuration list for PBXProject "GitX" */; compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, diff --git a/html/css/GitX.css b/html/css/GitX.css index c8a03f3..7e84871 100644 --- a/html/css/GitX.css +++ b/html/css/GitX.css @@ -1,9 +1,26 @@ @import url("diff.css"); @import url("notification.css"); + body { margin: 0; margin-top: 5px; width: 100%; font-family: 'Lucida Grande', Arial; } + +#message { + margin-left: 20px; + margin-right: 20px; + margin-top: 40px; + text-align: center; + font-size: 200%; + padding: 20px; + width: auto; + + background-color: #B4D7FF; + border: 2px solid #45A1FE; + + -webkit-border-radius: 10px; +} + diff --git a/html/views/blame/blame.js b/html/views/blame/blame.js index a89326b..d7e768f 100644 --- a/html/views/blame/blame.js +++ b/html/views/blame/blame.js @@ -1,9 +1,15 @@ +var setMessage = function(message) { + $("message").style.display = ""; + $("message").innerHTML = message.escapeHTML(); + $("blame").style.display = "none"; +} + var showFile = function(txt) { - $("txt").style.display = ""; - $("txt").innerHTML="
"+txt+"
"; + $("blame").style.display = ""; + $("blame").innerHTML="
"+txt+"
"; + $("message").style.display = "none"; SyntaxHighlighter.defaults['toolbar'] = false; - SyntaxHighlighter.highlight(); return; } diff --git a/html/views/blame/index copy.html b/html/views/blame/index copy.html deleted file mode 100644 index af371b6..0000000 --- a/html/views/blame/index copy.html +++ /dev/null @@ -1,726 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

author Pieter de Bie

summary Add a Tree displayer

-
    //
-    //  PBGitTree.m
-    //  GitTest
-    //
-    //  Created by Pieter de Bie on 15-06-08.
-    //  Copyright 2008 __MyCompanyName__. All rights reserved.
-    //
-    
-    #import "PBGitTree.h"
-    #import "PBGitCommit.h"
-    #import "NSFileHandleExt.h"
-

author Pieter de Bie

summary Allow double click to open file

-
    #import "PBEasyPipe.h"
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
    #import "PBEasyFS.h"
-

author Pieter de Bie

summary Add a Tree displayer

-
    
-    @implementation PBGitTree
-    
-    @synthesize sha, path, repository, leaf, parent;
-    
-    + (PBGitTree*) rootForCommit:(id) commit
-    {
-

author Pieter de Bie

summary Add a Tree displayer

-
        PBGitCommit* c = commit;
-        PBGitTree* tree = [[self alloc] init];
-        tree.parent = nil;
-        tree.leaf = NO;
-

author Pieter de Bie

summary Include libgit2 as submodule and use it to store sha's

-
        tree.sha = [c realSha];
-

author Pieter de Bie

summary Add a Tree displayer

-
        tree.repository = c.repository;
-        tree.path = @"";
-        return tree;
-    }
-    
-    + (PBGitTree*) treeForTree: (PBGitTree*) prev andPath: (NSString*) path;
-    {
-        PBGitTree* tree = [[self alloc] init];
-        tree.parent = prev;
-        tree.sha = prev.sha;
-        tree.repository = prev.repository;
-        tree.path = path;
-        return tree;
-    }
-    
-    - init
-    {
-        children = nil;
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
        localFileName = nil;
-

author Pieter de Bie

summary Add a Tree displayer

-
        leaf = YES;
-        return self;
-    }
-    
-

author Pieter de Bie

summary Use unified interface and display tree contents

-
    - (NSString*) refSpec
-    {
-        return [NSString stringWithFormat:@"%@:%@", self.sha, self.fullPath];
-    }
-    
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
    - (BOOL) isLocallyCached
-    {
-        NSFileManager* fs = [NSFileManager defaultManager];
-        if (localFileName && [fs fileExistsAtPath:localFileName])
-        {
-            NSDate* mtime = [[fs attributesOfItemAtPath:localFileName error: nil] objectForKey:NSFileModificationDate];
-            if ([mtime compare:localMtime] == 0)
-                return YES;
-        }
-        return NO;
-    }
-    
-

author Johannes Gilger

summary PBGitTree: Improve binary-file decision

-
    - (BOOL)hasBinaryHeader:(NSString*)contents
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
    {
-

author Johannes Gilger

summary PBGitTree: Improve binary-file decision

-
        if(!contents)
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
            return NO;
-    
-

author Johannes Gilger

summary PBGitTree: Improve binary-file decision

-
        return [contents rangeOfString:@"\0" options:0 range:NSMakeRange(0, ([contents length] >= 8000) ? 7999 : [contents length])].location != NSNotFound;
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
    }
-    
-    - (BOOL)hasBinaryAttributes
-    {
-        // First ask git check-attr if the file has a binary attribute custom set
-        NSFileHandle *handle = [repository handleInWorkDirForArguments:[NSArray arrayWithObjects:@"check-attr", @"binary", [self fullPath], nil]];
-        NSData *data = [handle readDataToEndOfFile];
-        NSString *string = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding];
-    
-        if (!string)
-            return NO;
-        string = [string stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]];
-    
-        if ([string hasSuffix:@"binary: set"])
-            return YES;
-    
-        if ([string hasSuffix:@"binary: unset"])
-            return NO;
-    
-        // Binary state unknown, do a check on common filename-extensions
-        for (NSString *extension in [NSArray arrayWithObjects:@".pdf", @".jpg", @".jpeg", @".png", @".bmp", @".gif", @".o", nil]) {
-            if ([[self fullPath] hasSuffix:extension])
-                return YES;
-        }
-    
-        return NO;
-    }
-    
-

author Pieter de Bie

summary Use unified interface and display tree contents

-
    - (NSString*) contents
-    {
-        if (!leaf)
-

author dbr

summary When selecting a folder in tree-view, display the

-
            return [NSString stringWithFormat:@"This is a tree with path %@", [self fullPath]];
-

author German Laullon

summary initial blame functionality on tree view

-
        
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
        if ([self isLocallyCached]) {
-            NSData *data = [NSData dataWithContentsOfFile:localFileName];
-            NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-            if (!string)
-                string = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding];
-            return string;
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
        }
-        
-

author German Laullon

summary initial blame functionality on tree view

-
        //return [repository outputForArguments:[NSArray arrayWithObjects:@"show", [self refSpec], nil]];
-        return [repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"blame", self.path, nil]];
-    }
-    
-

author German Laullon

summary HTML Blame

-
    // XXX: create img tag for images.
-

author German Laullon

summary initial blame functionality on tree view

-
    - (NSString*) contents:(NSInteger)option
-    {
-

author German Laullon

summary HTML Blame

-
        NSString* contents;
-    
-

author German Laullon

summary initial blame functionality on tree view

-
        if (!leaf)
-            return [NSString stringWithFormat:@"This is a tree with path %@", [self fullPath]];
-        
-

author German Laullon

summary HTML Blame

-
        if ([self hasBinaryAttributes])
-            return [NSString stringWithFormat:@"%@ appears to be a binary file of %d bytes", [self fullPath], [self fileSize]];
-        
-        if ([self fileSize] > 52428800) // ~50MB
-            return [NSString stringWithFormat:@"%@ is too big to be displayed (%d bytes)", [self fullPath], [self fileSize]];
-        
-

author German Laullon

summary initial blame functionality on tree view

-
        if(option==0)
-

author German Laullon

summary HTML Blame

-
            contents= [repository outputForArguments:[NSArray arrayWithObjects:@"show", [self refSpec], nil]];
-

author German Laullon

summary initial blame functionality on tree view

-
        else
-

author German Laullon

summary HTML Blame

-
            contents=[PBGitTree parseBlame:[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"blame", @"-p", self.fullPath, nil]]];
-        
-        if ([self hasBinaryHeader:contents])
-            return [NSString stringWithFormat:@"%@ appears to be a binary file of %d bytes", [self fullPath], [self fileSize]];
-        
-        return contents;
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
    }
-    
-    - (long long)fileSize
-    {
-        if (_fileSize)
-            return _fileSize;
-    
-        NSFileHandle *handle = [repository handleForArguments:[NSArray arrayWithObjects:@"cat-file", @"-s", [self refSpec], nil]];
-        NSString *sizeString = [[NSString alloc] initWithData:[handle readDataToEndOfFile] encoding:NSISOLatin1StringEncoding];
-    
-        if (!sizeString)
-            _fileSize = -1;
-        else
-            _fileSize = [sizeString longLongValue];
-    
-        return _fileSize;
-    }
-    
-    - (NSString *)textContents
-    {
-        if (!leaf)
-            return [NSString stringWithFormat:@"This is a tree with path %@", [self fullPath]];
-    
-        if ([self hasBinaryAttributes])
-            return [NSString stringWithFormat:@"%@ appears to be a binary file of %d bytes", [self fullPath], [self fileSize]];
-    
-

author Johannes Gilger

summary PBGitTree: Improve binary-file decision

-
        if ([self fileSize] > 52428800) // ~50MB
-            return [NSString stringWithFormat:@"%@ is too big to be displayed (%d bytes)", [self fullPath], [self fileSize]];
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
    
-

author Johannes Gilger

summary PBGitTree: Improve binary-file decision

-
        NSString* contents = [self contents];
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
    
-

author Johannes Gilger

summary PBGitTree: Improve binary-file decision

-
        if ([self hasBinaryHeader:contents])
-            return [NSString stringWithFormat:@"%@ appears to be a binary file of %d bytes", [self fullPath], [self fileSize]];
-

author Johannes Gilger

summary PBGitTree: Don't try to print binary-file contents

-
    
-        return contents;
-

author Pieter de Bie

summary Use unified interface and display tree contents

-
    }
-    
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
    - (void) saveToFolder: (NSString *) dir
-    {
-        NSString* newName = [dir stringByAppendingPathComponent:path];
-    
-        if (leaf) {
-            NSFileHandle* handle = [repository handleForArguments:[NSArray arrayWithObjects:@"show", [self refSpec], nil]];
-            NSData* data = [handle readDataToEndOfFile];
-            [data writeToFile:newName atomically:YES];
-        } else { // Directory
-            [[NSFileManager defaultManager] createDirectoryAtPath:newName attributes:nil];
-

author Michael Stephens

summary Fix saving tree to folder

-
            for (PBGitTree* child in [self children])
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
                [child saveToFolder: newName];
-        }
-    }
-    
-    - (NSString*) tmpDirWithContents
-    {
-        if (leaf)
-            return nil;
-    
-        if (!localFileName)
-            localFileName = [PBEasyFS tmpDirWithPrefix: path];
-    
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
        for (PBGitTree* child in [self children]) {
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
            [child saveToFolder: localFileName];
-        }
-        
-        return localFileName;
-    }
-    
-        
-    
-

author Pieter de Bie

summary Allow double click to open file

-
    - (NSString*) tmpFileNameForContents
-    {
-        if (!leaf)
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
            return [self tmpDirWithContents];
-        
-        if ([self isLocallyCached])
-            return localFileName;
-        
-        if (!localFileName)
-

author Ciar‡n Walsh

summary Prevent confusing filenames when quick-looking files.

-
            localFileName = [[PBEasyFS tmpDirWithPrefix: sha] stringByAppendingPathComponent:path];
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
        
-

author Pieter de Bie

summary Allow double click to open file

-
        NSFileHandle* handle = [repository handleForArguments:[NSArray arrayWithObjects:@"show", [self refSpec], nil]];
-        NSData* data = [handle readDataToEndOfFile];
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
        [data writeToFile:localFileName atomically:YES];
-        
-        NSFileManager* fs = [NSFileManager defaultManager];
-        localMtime = [[fs attributesOfItemAtPath:localFileName error: nil] objectForKey:NSFileModificationDate];
-    
-        return localFileName;
-

author Pieter de Bie

summary Allow double click to open file

-
    }
-    
-

author Pieter de Bie

summary Add a Tree displayer

-
    - (NSArray*) children
-    {
-

author Pieter de Bie

summary Use unified interface and display tree contents

-
        if (children != nil)
-

author Pieter de Bie

summary Add a Tree displayer

-
            return children;
-        
-

author Pieter de Bie

summary Use unified interface and display tree contents

-
        NSString* ref = [self refSpec];
-

author Pieter de Bie

summary Add a Tree displayer

-
    
-        NSFileHandle* handle = [repository handleForArguments:[NSArray arrayWithObjects:@"show", ref, nil]];
-        [handle readLine];
-        [handle readLine];
-        
-        NSMutableArray* c = [NSMutableArray array];
-        
-        NSString* p = [handle readLine];
-        while (p.length > 0) {
-

author Nathan Kinsinger

summary Bugfix: Avoid looping while parsing the children of a tree

-
            if ([p isEqualToString:@"\r"])
-                break;
-    
-

author Pieter de Bie

summary Add a Tree displayer

-
            BOOL isLeaf = ([p characterAtIndex:p.length - 1] != '/');
-            if (!isLeaf)
-                p = [p substringToIndex:p.length -1];
-    
-            PBGitTree* child = [PBGitTree treeForTree:self andPath:p];
-            child.leaf = isLeaf;
-            [c addObject: child];
-            
-            p = [handle readLine];
-        }
-        children = c;
-        return c;
-    }
-    
-    - (NSString*) fullPath
-    {
-        if (!parent)
-            return @"";
-        
-        if ([parent.fullPath isEqualToString:@""])
-            return self.path;
-        
-        return [parent.fullPath stringByAppendingPathComponent: self.path];
-    }
-    
-

author Pieter de Bie

summary Delete temporary files when they are deallocated

-
    - (void) finalize
-    {
-        if (localFileName)
-            [[NSFileManager defaultManager] removeFileAtPath:localFileName handler:nil];
-        [super finalize];
-    }
-

author German Laullon

summary HTML Blame

-
    
-    +(NSString *)parseBlame:(NSString *)string
-    {
-        string=[string stringByReplacingOccurrencesOfString:@"<" withString:@"<"];
-        string=[string stringByReplacingOccurrencesOfString:@">" withString:@">"];
-

author German Laullon

summary HTML Blame

-
        
-        NSArray *lines = [string componentsSeparatedByString:@"\n"];
-        NSString *line;
-        NSMutableDictionary *headers=[NSMutableDictionary dictionary];
-        NSMutableString *res=[NSMutableString string];
-        
-        [res appendString:@"<table class='blocks'>\n"];
-        int i=0;
-        while(i<[lines count]){
-            line=[lines objectAtIndex:i];
-            NSArray *header=[line componentsSeparatedByString:@" "];
-            if([header count]==4){
-                int nLines=[(NSString *)[header objectAtIndex:3] intValue];
-                [res appendFormat:@"<tr class='block l%d'>\n",nLines];
-                line=[lines objectAtIndex:++i];
-                if([[[line componentsSeparatedByString:@" "] objectAtIndex:0] isEqual:@"author"]){
-                    NSString *author=line;
-                    NSString *summary=nil;
-                    while(summary==nil){
-                        line=[lines objectAtIndex:i++];
-                        if([[[line componentsSeparatedByString:@" "] objectAtIndex:0] isEqual:@"summary"]){
-                            summary=line;
-                        }
-                    }
-                    NSString *block=[NSString stringWithFormat:@"<td><p class='author'>%@</p><p class='summary'>%@</p></td>\n<td>\n",author,summary];
-                    [headers setObject:block forKey:[header objectAtIndex:0]];
-                }
-                [res appendString:[headers objectForKey:[header objectAtIndex:0]]];
-                
-

author Not Committed Yet

summary Version of PBGitTree.m from PBGitTree.m

-
                NSMutableString *code=[NSMutableString string];
-

author German Laullon

summary HTML Blame

-
                do{
-                    line=[lines objectAtIndex:i++];
-                }while([line characterAtIndex:0]!='\t');
-                line=[line stringByReplacingOccurrencesOfString:@"\t" withString:@"    "];
-

author Not Committed Yet

summary Version of PBGitTree.m from PBGitTree.m

-
                [code appendString:line];
-                [code appendString:@"\n"];
-

author German Laullon

summary HTML Blame

-
                
-                int n;
-                for(n=1;n<nLines;n++){
-                    line=[lines objectAtIndex:i++];
-                    NSArray *h=[line componentsSeparatedByString:@" "];
-                    do{
-                        line=[lines objectAtIndex:i++];
-                    }while([line characterAtIndex:0]!='\t');
-                    line=[line stringByReplacingOccurrencesOfString:@"\t" withString:@"    "];
-

author Not Committed Yet

summary Version of PBGitTree.m from PBGitTree.m

-
                    [code appendString:line];
-                    [code appendString:@"\n"];
-

author German Laullon

summary HTML Blame

-
                }
-

author Not Committed Yet

summary Version of PBGitTree.m from PBGitTree.m

-
                [res appendFormat:@"<pre class='first-line: %@;brush: js'>%@</pre>",[header objectAtIndex:2],code];
-                [res appendString:@"</td>\n"];
-

author German Laullon

summary HTML Blame

-
            }else{
-                break;
-            }
-            [res appendString:@"</tr>\n"];
-        }  
-        [res appendString:@"</table>\n"];
-

author Not Committed Yet

summary Version of PBGitTree.m from PBGitTree.m

-
        NSLog(@"%@",res);
-

author German Laullon

summary HTML Blame

-
    
-        return (NSString *)res;
-    }
-

author Pieter de Bie

summary Add a Tree displayer

-
    @end
-
- - - \ No newline at end of file diff --git a/html/views/blame/index.html b/html/views/blame/index.html index 5efde8e..a6301a7 100644 --- a/html/views/blame/index.html +++ b/html/views/blame/index.html @@ -1,14 +1,44 @@ - - - - - - - + - - - - - - - - - - -
- + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - -
-
-//
-//  AppController.h
-//  MGScopeBar
-//
-//  Created by Matt Gemmell on 16/03/2008.
-//
-
-/* dhfas fldsa */
-
-/*
-fjdsahf dsaf dlsaf jd;sa
-fdjksal; fjhdsa
-*/
-
-#import <Cocoa/Cocoa.h>
-#import "MGScopeBarDelegateProtocol.h"
-
-
-/* dhfas fldsa */
-
-@interface AppController : NSObject  {
-	IBOutlet NSTextField *labelField;
-	IBOutlet MGScopeBar *scopeBar;
-	IBOutlet NSView *accessoryView;
-	NSMutableArray *groups;
-}
-
-@property(retain) NSMutableArray *groups;
-
-@end
-
- -
- - \ No newline at end of file diff --git a/html/views/log/index.html b/html/views/log/index.html index 593d6b1..b4889dc 100644 --- a/html/views/log/index.html +++ b/html/views/log/index.html @@ -1,19 +1,17 @@ - - Details for commit - - - - - - - - - - - - -
- + + - - - - - - - - - - -
- - - - -
Commit:703782163ddb653789c304e396eadb31f541864f
Author:Pieter de Bie
Date:10 months ago
-
PBChangedFile: Add assert to make sure we're not doing something stupid
-
-
- -
- - - - -
Commit:0d8ba8c2632e129fe7627f86d907c8b470c1bf20
Author:Pieter de Bie
Date:1 year, 1 month ago
-
Rename 'CachedChanges" to "StagedChanges" for greater consistency
-
-
- -
- - - - -
Commit:f9ff15cc6bf3c807425321581002f676985dd222
Author:Pieter de Bie
Date:1 year, 1 month ago
-
PBChangedFile: remove shouldBeDeleted boolean
-
We don't need this anymore
-
- -
- - - - -
Commit:8d729dae4cc8d3b564d149d6c9bb96922ee1bafa
Author:Pieter de Bie
Date:1 year, 6 months ago
-
CommitView: Don't change selection when refreshing
-
We used to read in a completely new array when refreshing -the index. The problem with this is that the selection -changes when reading in the new array. We avoid this -by changing the current array, rather than loading in -a completely new one.
-
- -
- - - - -
Commit:0975426f2f5119335c00768006b1ede0252ac448
Author:Pieter de Bie
Date:2 years, 7 months ago
-
CommitView: move index functions to separate controller
-
This merges functionality that was previously stored in the -combination of PBGitCommitController / PBChangedFile to a -dedicated controller, PBGitIndexController. -
-
- -
- - - - -
Commit:1d19bd64dfa83def18d5271c9afef9300ef0d65e
Author:Pieter de Bie
Date:2 years, 8 months ago
-
PBChangedFile: Don't use cat to read file contents
-
This changes PBChangedFile to read in files by using -NSString's stringWithContentsOfFile: method. - -It still uses the UTF8 encoding scheme so that we -can capture binary files. This should perhaps be loosened to -also allow other encodings. -
-
- -
- - - - -
Commit:472d36c7f970d9f3dbda3b9d7c8a7d51546bda56
Author:Pieter de Bie
Date:2 years, 8 months ago
-
CommitView: Add context menu to revert changes
-
-
- -
- - - - -
Commit:e659e63fc08ecd46cc1c26b6260126502ec656aa
Author:Pieter de Bie
Date:2 years, 8 months ago
-
CommitView: Add option to amend commits
-
-
- -
- - - - -
Commit:5010511bdb358ad376fd4668368bc5c12d9d8214
Author:Pieter de Bie
Date:2 years, 8 months ago
-
CommitView: Always use a single PBChangedFile object
-
This makes sure we don't add a double object to our array, -if a file has both cached and unstaged changes. -
-
- -
- - - - -
Commit:a0f248ef9f50a3af0efebdfb29c706bd97011a97
Author:Pieter de Bie
Date:2 years, 8 months ago
-
CommitView: Also show deleted files correctly
-
-
- -
- - - - -
Commit:001b6bf10eeaaf618971bc079e7415690c4c8d1a
Author:Pieter de Bie
Date:2 years, 9 months ago
-
CommitView: Handle new files better
-
This fixes the 'cat' command that was acting up and also shows -information when a file could not be displayed
-
- -
- - - - -
Commit:aafc284eb8fbd69acf40acfef07e25f409a87a18
Author:Pieter de Bie
Date:2 years, 9 months ago
-
ChangedFile: add a path separator to reset command
-
Sometimes a file could not be reset because it contained weird characters. - -This hopefully fixes it. -
-
- -
- - - - -
Commit:76e176e8b4ac59438340b129874ffbdfa7404ea3
Author:Pieter de Bie
Date:2 years, 9 months ago
-
Add staging and unstaging of files
-
-
- -
- - - - -
Commit:9b3909e7592d3c8648accb67642a2b57a441f128
Author:Pieter de Bie
Date:2 years, 9 months ago
-
CommitView: Add a status bar to the diff view
-
-
- -
- - - - -
Commit:44009b6f3e7e6fc5b54910c2b2a9a54b13f95a14
Author:Pieter de Bie
Date:2 years, 9 months ago
-
CommitView: use only one array for all files
-
-
- -
- - - - -
Commit:252796ee26ce733c4a6d3044e3142f9ee5df005e
Author:Pieter de Bie
Date:2 years, 9 months ago
-
CommitView: Show basic files
-
-
- - \ No newline at end of file diff --git a/html/views/source/index.html b/html/views/source/index.html index fc4effe..a16941a 100644 --- a/html/views/source/index.html +++ b/html/views/source/index.html @@ -9,6 +9,7 @@ +
\ No newline at end of file