Anonymous avatar Anonymous committed 1154053

Add branch to Rev Log

Comments (0)

Files changed (4)

Add a comment to this file

English.lproj/RevisionDescriptionTemplate.rtf

Binary file modified.

-{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
 {\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fswiss\fcharset0 ArialNarrow;}
 {\colortbl;\red255\green255\blue255;}
-{\info
-{\author Jens Alfke}}\margl1440\margr1440\vieww9720\viewh11580\viewkind0
 \pard\tqr\tx760\tx960\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li1280\fi-1280\ql\qnatural\pardirnatural
 
 \f0\fs22 \cf0 	
 \b #LOCAL:
 \b0 	
-\f1 IDENTIFIER
+\f1 IDENTIFIER\
+
+\f0\b Branch
+\f1\b0 : BRANCH
 \f0 \
 
 \b 	Date:

Source/HgLogOperation.m

         revision.comment = strForXPath(changeset,@"description/child::text()");
         revision.author = strForXPath(changeset,@"author/@name");
         revision.email = strForXPath(changeset,@"author/@email");
+        revision.branch = strForXPath(changeset,@"branch/@name");
     }
     
     // Link to its parent(s):

Source/HgRevision.h

 {
     HgRepository *_repository;
     int _localNumber;
-    NSString *_comment, *_shortComment, *_author, *_email;
+    NSString *_comment, *_shortComment, *_author, *_email, *_branch;
     NSDate *_date;
     HgRevisionID _identifier;
     HgRevision *_parent, *_parent2;
 @property (readonly,nonatomic)  int localNumber;
 @property (readonly,nonatomic)  HgRevisionID identifier;
 @property (readonly,nonatomic)  NSString *identifierString, *localString;
-@property (copy,nonatomic)      NSString *comment, *author, *email;
+@property (copy,nonatomic)      NSString *comment, *author, *email, *branch;
 @property (readonly,copy,nonatomic)  NSString *shortComment, *formattedDescription;
 @property (readonly,copy,nonatomic)  NSAttributedString *richFormattedDescription;
 @property (copy,nonatomic)      NSDate *date;

Source/HgRevision.m

     _email = email;
 }
 
+- (NSString*) branch {
+    if (!_date) [self _getDetails];
+    return _branch;
+}
+
+- (void) setBranch: (NSString*)branch {
+    _branch = branch;
+}
+
 
 - (NSArray*) parents
 {
     NSMutableAttributedString *desc = [sTemplate mutableCopy];
     replace(desc, @"DESCRIPTION",(_comment ?: @""));
     replaceAndLink(desc, @"AUTHOR",     self.author, email, self.email);
+    replace(desc, @"BRANCH",       self.branch ? self.branch : @"default");
     replace(desc, @"DATE",       self.formattedDate);
     replace(desc, @"IDENTIFIER", self.identifierString);
     replace(desc, @"LOCAL",      _localNumber !=NSNotFound ?$sprintf(@"%i",_localNumber): nil);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.