Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 145350 Details for
Bug 212330
[PATCH] app-portage/elogv enhancement
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
elogv-tags.patch
elogv-tags.patch (text/plain), 3.07 KB, created by
Luca Marturana
on 2008-03-05 13:48:31 UTC
(
hide
)
Description:
elogv-tags.patch
Filename:
MIME Type:
Creator:
Luca Marturana
Created:
2008-03-05 13:48:31 UTC
Size:
3.07 KB
patch
obsolete
>--- elogv.orig 2008-02-29 13:34:41.708110625 +0100 >+++ elogv 2008-02-29 13:33:59.415066969 +0100 >@@ -84,6 +84,9 @@ > curses.init_pair(ewarn, curses.COLOR_YELLOW, curses.COLOR_BLACK) > curses.init_pair(eerror, curses.COLOR_RED, curses.COLOR_BLACK) > curses.init_pair(elog, curses.COLOR_MAGENTA, curses.COLOR_BLACK) >+ >+ # Character used to print the class of an elog >+ self.class_char = "*" > > # This attributes are used to manage the scrolling of the list > # of files >@@ -238,10 +241,16 @@ > else: > self.usel += n > >- self.file_pad.addstr(prev_usel,0, >+ self.file_pad.addstr(prev_usel,1, >+ self.class_char, >+ curses.A_BOLD + self.classes[prev_usel]) >+ self.file_pad.addstr(prev_usel,3, > "%s - %s" % (self.packages[prev_usel],self.dates[prev_usel]), > curses.color_pair(normal)) >- self.file_pad.addstr(self.usel,0, >+ self.file_pad.addstr(self.usel,1, >+ self.class_char, >+ curses.A_BOLD + self.classes[self.usel]) >+ self.file_pad.addstr(self.usel,3, > "%s - %s" % (self.packages[self.usel],self.dates[self.usel]), > curses.color_pair(selected)) > >@@ -315,6 +324,7 @@ > > self.packages = [] > self.dates = [] >+ self.classes = [] > self.file_pad = curses.newpad(len(self.file_list),self.width) > self.file_pad.clear() > >@@ -322,6 +332,7 @@ > (category,package_name,other) = item.split(":") > self.packages.append(category + "/" + package_name) > self.dates.append(other[:8]) >+ self.classes.append(self.get_class(item)) > > for i in range(0,len(self.file_list)): > if i == self.usel: >@@ -329,10 +340,31 @@ > else: > cp = normal > >- self.file_pad.addstr(i,0, >+ self.file_pad.addstr(i,1, >+ self.class_char, >+ curses.A_BOLD + self.classes[i]) >+ self.file_pad.addstr(i,3, > "%s - %s" % (self.packages[i],self.dates[i]), > curses.color_pair(cp)) > >+ def get_class(self,item): >+ """ >+ Get the highest elog class in a file >+ """ >+ filepath = os.path.join(elogdir,item) >+ f = file(filepath) >+ >+ classes = re.findall("LOG:|INFO:|WARN:|ERROR:", f.read()) >+ >+ if "ERROR:" in classes: >+ return curses.color_pair(eerror) >+ elif "WARN:" in classes: >+ return curses.color_pair(ewarn) >+ elif "INFO:" in classes: >+ return curses.color_pair(einfo) >+ else: >+ return curses.color_pair(elog) >+ > def show_log(self): > """ > Display the selected file, if the length of the file is bigger than
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 212330
:
145313
| 145350