diff src/changeset.cpp @ 520:a17c06f773cd

idiot -- we don't need to query bookmarks separately, we can just add them to the log template
author Chris Cannam
date Wed, 09 Nov 2011 13:04:00 +0000
parents c623ce6b3104
children b5a342a71218
line wrap: on
line diff
--- a/src/changeset.cpp	Tue Nov 08 16:42:09 2011 +0000
+++ b/src/changeset.cpp	Wed Nov 09 13:04:00 2011 +0000
@@ -33,6 +33,10 @@
             QStringList tags = e.value(key).split
                 (" ", QString::SkipEmptyParts);
             setTags(tags);
+        } else if (key == "bookmarks") {
+            QStringList bmarks = e.value(key).split
+                (" ", QString::SkipEmptyParts);
+            setBookmarks(bmarks);
         } else if (key == "timestamp") {
             setTimestamp(e.value(key).split(" ")[0].toULongLong());
         } else if (key == "changeset") {
@@ -45,7 +49,7 @@
 
 QString Changeset::getLogTemplate()
 {
-    return "id: {rev}:{node|short}\\nauthor: {author}\\nbranch: {branches}\\ntag: {tags}\\ndatetime: {date|isodate}\\ntimestamp: {date|hgdate}\\nage: {date|age}\\nparents: {parents}\\ncomment: {desc|json}\\n\\n";
+    return "id: {rev}:{node|short}\\nauthor: {author}\\nbranch: {branches}\\ntag: {tags}\\nbookmarks: {bookmarks}\\ndatetime: {date|isodate}\\ntimestamp: {date|hgdate}\\nage: {date|age}\\nparents: {parents}\\ncomment: {desc|json}\\n\\n";
 }
 
 QString Changeset::formatHtml()
@@ -71,6 +75,7 @@
 	      << "datetime"
 	      << "branch"
 	      << "tags"
+	      << "bookmarks"
 	      << "comment";
 
     propTexts << QObject::tr("Identifier:")
@@ -89,6 +94,8 @@
             value = c;
         } else if (prop == "tags") {
             value = tags().join(" ");
+        } else if (prop == "bookmarks") {
+            value = bookmarks().join(" ");
         } else {
 	    value = xmlEncode(property(prop.toLocal8Bit().data()).toString());
 	}