Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 390712 Details for
Bug 531332
app-portage/portage-utils: qlop -s, git support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-qlop-s-support-git-sync-messages.patch
0001-qlop-s-support-git-sync-messages.patch (text/plain), 1.93 KB, created by
Michał Górny
on 2014-12-01 13:11:20 UTC
(
hide
)
Description:
0001-qlop-s-support-git-sync-messages.patch
Filename:
MIME Type:
Creator:
Michał Górny
Created:
2014-12-01 13:11:20 UTC
Size:
1.93 KB
patch
obsolete
>From 9d02048dc06a3809658b9930ac5f994b66a06656 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> >Date: Mon, 1 Dec 2014 14:09:08 +0100 >Subject: [PATCH] qlop -s: support git sync messages > >--- > qlop.c | 36 +++++++++++++++++++++++++++++------- > 1 file changed, 29 insertions(+), 7 deletions(-) > >diff --git a/qlop.c b/qlop.c >index d5e2226..2080fdd 100644 >--- a/qlop.c >+++ b/qlop.c >@@ -319,13 +319,23 @@ show_sync_history(const char *logfile) > > buf = NULL; > while (getline(&buf, &buflen, fp) != -1) { >- if (strlen(buf) < 35) >+ /* Possibilities: >+ * 1417415175: === Sync completed with rsync://... >+ * 1417299771: >>> Git pull successful: /usr/portage >+ * 1417438324: >>> Git clone successful >+ * ^ ^ ^ >+ * 123456789012345678901234567890123456 >+ */ >+ if (strlen(buf) < 36) > continue; >- if (strncmp(buf+12, "=== Sync completed with", 23) != 0) >+ if (strncmp(buf+12, "=== Sync completed with", 23) != 0 >+ && strncmp(buf+12, ">>> Git pull successful:", 24) != 0 >+ && strncmp(buf+12, ">>> Git clone successful", 24) != 0) > continue; > > if ((p = strchr(buf, '\n')) != NULL) > *p = 0; >+ /* timestamp */ > if ((p = strchr(buf, ':')) == NULL) > continue; > *p = 0; >@@ -333,11 +343,23 @@ show_sync_history(const char *logfile) > > t = (time_t)atol(buf); > >- if ((p = strstr(q, "with")) == NULL) >- continue; >- q = p + 5; >- >- printf("%s >>> %s%s%s\n", chop_ctime(t), GREEN, q, NORM); >+ if ((p = strstr(q, "with")) != NULL) >+ { >+ /* 'Sync completed with' variant */ >+ q = p + 5; >+ printf("%s >>> %s%s%s\n", chop_ctime(t), GREEN, q, NORM); >+ } >+ else if ((p = strchr(q, ':')) != NULL) >+ { >+ /* 'Git pull successful:' variant */ >+ q = p + 2; >+ printf("%s >>> %s%s%s\n", chop_ctime(t), GREEN, q, NORM); >+ } >+ else >+ { >+ /* '>>> Git clone successful' variant */ >+ printf("%s >>> %s[initial clone]%s\n", chop_ctime(t), GREEN, NORM); >+ } > } > > free(buf); >-- >2.1.3 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 531332
: 390712