Date: Sun, 11 Jul 2010 21:27:27 GMT From: Ivan Voras <ivoras@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 180783 for review Message-ID: <201007112127.o6BLRRvn011079@repoman.freebsd.org>
index | next in thread | raw e-mail
http://p4web.freebsd.org/@@180783?ac=10 Change 180783 by ivoras@betelgeuse on 2010/07/11 21:26:48 Twirling baton FTW! Affected files ... .. //depot/projects/soc2010/pkg_patch/src/patch/Makefile#25 edit .. //depot/projects/soc2010/pkg_patch/src/patch/applypatch.c#15 edit .. //depot/projects/soc2010/pkg_patch/src/patch/applypatch.h#15 edit .. //depot/projects/soc2010/pkg_patch/src/patch/hashjob.c#24 edit .. //depot/projects/soc2010/pkg_patch/src/patch/hashjob.h#24 edit .. //depot/projects/soc2010/pkg_patch/src/patch/main.c#25 edit .. //depot/projects/soc2010/pkg_patch/src/patch/mkpatch.c#23 edit .. //depot/projects/soc2010/pkg_patch/src/patch/mkpatch.h#23 edit .. //depot/projects/soc2010/pkg_patch/src/patch/mkpatchdir.c#8 edit .. //depot/projects/soc2010/pkg_patch/src/patch/mkpatchdir.h#7 edit .. //depot/projects/soc2010/pkg_patch/src/patch/pkg_patch.h#23 edit .. //depot/projects/soc2010/pkg_patch/src/patch/support.c#22 edit .. //depot/projects/soc2010/pkg_patch/src/patch/updateweb.c#3 edit .. //depot/projects/soc2010/pkg_patch/src/patch/updateweb.h#3 edit Differences ... ==== //depot/projects/soc2010/pkg_patch/src/patch/Makefile#25 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/applypatch.c#15 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/applypatch.h#15 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/hashjob.c#24 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/hashjob.h#24 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/main.c#25 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/mkpatch.c#23 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/mkpatch.h#23 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/mkpatchdir.c#8 (text+ko) ==== @@ -99,6 +99,8 @@ snprintf(ppatch, PATH_MAX, "%s/%s", dpatch, pname); if (Verbose > 2) printf("\t(%s -> %s via %s)\n", pold, pnew, ppatch); + if (Verbose) + baton_twirl(); perform_mkpatch(pold, pnew, ppatch); fprintf(fpl, "@havepatch %s-%s %s-%s %s %s\n", basename, version1, basename, version2, pname, time_to_iso8601(-1)); ==== //depot/projects/soc2010/pkg_patch/src/patch/mkpatchdir.h#7 (text+ko) ==== ==== //depot/projects/soc2010/pkg_patch/src/patch/pkg_patch.h#23 (text+ko) ==== @@ -153,5 +153,6 @@ char *time_to_iso8601(time_t t); time_t iso8601_to_time(char *t); char *time_ctime(time_t t); +void baton_twirl(void); #endif ==== //depot/projects/soc2010/pkg_patch/src/patch/support.c#22 (text+ko) ==== @@ -628,3 +628,15 @@ t = time(NULL); return (ctime(&t)); } + + +/* Twirl the baton, writing backspace */ +void +baton_twirl() +{ + static char bpos[4] = { '-', '\\', '|', '/' }; + static unsigned int counter = 0; + + fprintf(stdout, "%c\b", bpos[counter++ % 4]); + fflush(stdout); +} ==== //depot/projects/soc2010/pkg_patch/src/patch/updateweb.c#3 (text+ko) ==== @@ -138,6 +138,8 @@ bs = fread(buf, 1, bs, fin); if (bs > 0) fwrite(buf, 1, bs, fout); + if (Verbose) + baton_twirl(); } free(buf); er = ferror(fin); @@ -204,6 +206,8 @@ err(1, "Cannot read pkgpatchindex: %s", local_index); if (Verbose > 2) STAILQ_FOREACH(pr, &prlist, linkage) - printf("Patch available: %s to %s via %s\n", pr->source, + printf("Available: %s to %s via %s\n", pr->source, pr->target, pr->patch_name); + + } ==== //depot/projects/soc2010/pkg_patch/src/patch/updateweb.h#3 (text+ko) ====help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007112127.o6BLRRvn011079>
