##// END OF EJS Templates
hgk: add revision numbers
Brendan Cully -
r3092:d0fcce37 default
parent child Browse files
Show More
@@ -176,6 +176,7 b' proc parsecommit {id contents listed old'
176 set audate {}
176 set audate {}
177 set comname {}
177 set comname {}
178 set comdate {}
178 set comdate {}
179 set rev {}
179 if {![info exists nchildren($id)]} {
180 if {![info exists nchildren($id)]} {
180 set children($id) {}
181 set children($id) {}
181 set nchildren($id) 0
182 set nchildren($id) 0
@@ -209,6 +210,8 b' proc parsecommit {id contents listed old'
209 set x [expr {[llength $line] - 2}]
210 set x [expr {[llength $line] - 2}]
210 set comdate [lindex $line $x]
211 set comdate [lindex $line $x]
211 set comname [join [lrange $line 1 [expr {$x - 1}]]]
212 set comname [join [lrange $line 1 [expr {$x - 1}]]]
213 } elseif {$tag == "revision"} {
214 set rev [lindex $line 1]
212 }
215 }
213 }
216 }
214 } else {
217 } else {
@@ -233,7 +236,7 b' proc parsecommit {id contents listed old'
233 set comdate [clock format $comdate -format "%Y-%m-%d %H:%M:%S"]
236 set comdate [clock format $comdate -format "%Y-%m-%d %H:%M:%S"]
234 }
237 }
235 set commitinfo($id) [list $headline $auname $audate \
238 set commitinfo($id) [list $headline $auname $audate \
236 $comname $comdate $comment]
239 $comname $comdate $comment $rev]
237 }
240 }
238
241
239 proc readrefs {} {
242 proc readrefs {} {
@@ -2002,8 +2005,9 b' proc commit_descriptor {p} {'
2002 set l "..."
2005 set l "..."
2003 if {[info exists commitinfo($p)]} {
2006 if {[info exists commitinfo($p)]} {
2004 set l [lindex $commitinfo($p) 0]
2007 set l [lindex $commitinfo($p) 0]
2008 set r [lindex $commitinfo($p) 6]
2005 }
2009 }
2006 return "$p ($l)"
2010 return "$r:$p ($l)"
2007 }
2011 }
2008
2012
2009 # append some text to the ctext widget, and make any SHA1 ID
2013 # append some text to the ctext widget, and make any SHA1 ID
@@ -2107,6 +2111,7 b' proc selectline {l isnew} {'
2107 $ctext mark set fmark.0 0.0
2111 $ctext mark set fmark.0 0.0
2108 $ctext mark gravity fmark.0 left
2112 $ctext mark gravity fmark.0 left
2109 set info $commitinfo($id)
2113 set info $commitinfo($id)
2114 $ctext insert end "Revision: [lindex $info 6]\n"
2110 $ctext insert end "Author: [lindex $info 1] [lindex $info 2]\n"
2115 $ctext insert end "Author: [lindex $info 1] [lindex $info 2]\n"
2111 $ctext insert end "Committer: [lindex $info 3] [lindex $info 4]\n"
2116 $ctext insert end "Committer: [lindex $info 3] [lindex $info 4]\n"
2112 if {[info exists idtags($id)]} {
2117 if {[info exists idtags($id)]} {
@@ -90,6 +90,7 b' def catcommit(repo, n, prefix, changes=N'
90
90
91 print "author %s %s %s" % (changes[1], date, date_ar[1])
91 print "author %s %s %s" % (changes[1], date, date_ar[1])
92 print "committer %s %s %s" % (committer, date, date_ar[1])
92 print "committer %s %s %s" % (committer, date, date_ar[1])
93 print "revision %d" % repo.changelog.rev(n)
93 print ""
94 print ""
94 if prefix != "":
95 if prefix != "":
95 print "%s%s" % (prefix, changes[4].replace('\n', nlprefix).strip())
96 print "%s%s" % (prefix, changes[4].replace('\n', nlprefix).strip())
General Comments 0
You need to be logged in to leave comments. Login now