Hello community, here is the log from the commit of package cvsps checked in at Fri Sep 5 00:03:10 CEST 2008. -------- --- cvsps/cvsps.changes 2007-11-06 08:01:54.000000000 +0100 +++ cvsps/cvsps.changes 2008-09-03 18:07:13.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Sep 3 18:06:36 CEST 2008 - schwab@suse.de + +- Fix broken cmakefile. +- Add support for commitid. + +------------------------------------------------------------------- New: ---- commitid.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cvsps.spec ++++++ --- /var/tmp/diff_new_pack.U11817/_old 2008-09-05 00:01:32.000000000 +0200 +++ /var/tmp/diff_new_pack.U11817/_new 2008-09-05 00:01:32.000000000 +0200 @@ -1,14 +1,21 @@ # # spec file for package cvsps (Version 2.1) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild + Name: cvsps BuildRequires: cmake zlib-devel @@ -16,13 +23,14 @@ AutoReqProv: on Summary: A Program for Generating Patch Set Information from a CVS Repository Version: 2.1 -Release: 79 +Release: 163 %define real_version 2.1 Source: %{name}-%{real_version}.tar.bz2 Source1: bk-cvs.mail Source2: cvsps-bk-cvs.mail Source3: fixes.tar.bz2 Source4: CMakeLists.txt +Patch: commitid.diff Url: http://www.cobite.com/cvsps/ License: GPL v2 or later BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -42,13 +50,14 @@ %setup -q -n %{name}-%{real_version} tar xvfj %{SOURCE3} for patch in $(cat fixes/series); do - patch -p1 -i fixes/$patch + patch -p1 < fixes/$patch done cp %{SOURCE1} %{SOURCE2} %{SOURCE4} . +%patch -p1 %build export CFLAGS="%{optflags}" -cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} . +cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_VERBOSE_MAKEFILE=TRUE . %{__make} %{?jobs:-j%jobs} %install @@ -63,21 +72,25 @@ %doc bk-cvs.mail cvsps-bk-cvs.mail %{_bindir}/cvsps %{_mandir}/man*/* + %changelog -* Tue Nov 06 2007 - crrodriguez@suse.de +* Wed Sep 03 2008 schwab@suse.de +- Fix broken cmakefile. +- Add support for commitid. +* Tue Nov 06 2007 crrodriguez@suse.de - instead of patching the Makefiles use a simple cmake based build script -* Tue Jul 31 2007 - agruen@suse.de +* Tue Jul 31 2007 agruen@suse.de - Add fixes from http://ydirson.free.fr/soft/git/cvsps.git. - Use RPM_OPT_FLAGS. -* Fri Mar 30 2007 - ro@suse.de +* Fri Mar 30 2007 ro@suse.de - added zlib-devel to buildreq -* Wed Jan 25 2006 - mls@suse.de +* Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Wed Oct 05 2005 - dmueller@suse.de +* Wed Oct 05 2005 dmueller@suse.de - add norootforbuild -* Mon May 30 2005 - agruen@suse.de +* Mon May 30 2005 agruen@suse.de - Updater to version 2.1. -* Mon May 05 2003 - agruen@suse.de +* Mon May 05 2003 agruen@suse.de - Update to version 2.0rc1. -* Thu Mar 20 2003 - agruen@suse.de +* Thu Mar 20 2003 agruen@suse.de - Initial package. ++++++ CMakeLists.txt ++++++ --- cvsps/CMakeLists.txt 2007-10-29 04:55:24.000000000 +0100 +++ cvsps/CMakeLists.txt 2008-09-03 17:59:11.000000000 +0200 @@ -4,7 +4,7 @@ PROJECT(cvsps C) SET(CVSPS_VERSION_MAJOR 2) SET(CVSPS_VERSION_MINOR 1) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -DVERSION=\"${CVSPS_VERSION_MAJOR}.${CVSPS_VERSION_MINOR}\"") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -DVERSION=\\\"${CVSPS_VERSION_MAJOR}.${CVSPS_VERSION_MINOR}\\\"") FIND_PACKAGE(ZLIB REQUIRED) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) @@ -22,4 +22,4 @@ TARGET_LINK_LIBRARIES(cvsps ${ZLIB_LIBRARY}) INSTALL(PROGRAMS cvsps DESTINATION bin) -INSTALL(FILES cvsps.1 DESTINATION share/man/man1) \ No newline at end of file +INSTALL(FILES cvsps.1 DESTINATION share/man/man1) ++++++ commitid.diff ++++++ diff --git a/cache.c b/cache.c index 5f67a7c..762cfb7 100644 --- a/cache.c +++ b/cache.c @@ -89,6 +89,7 @@ enum CACHE_NEED_PS_TAG_FLAGS, CACHE_NEED_PS_BRANCH, CACHE_NEED_PS_BRANCH_ADD, + CACHE_NEED_PS_COMMITID_OR_DESCR, CACHE_NEED_PS_DESCR, CACHE_NEED_PS_EOD, CACHE_NEED_PS_MEMBERS, @@ -108,6 +109,7 @@ time_t read_cache() int tag_flags = 0; char branchbuff[LOG_STR_MAX] = ""; int branch_add = 0; + char cidbuff[CID_STR_MAX] = ""; int logbufflen = LOG_STR_MAX + 1; char * logbuff = malloc(logbufflen); time_t cache_date = -1; @@ -286,9 +288,19 @@ time_t read_cache() /* remove prefix "branch_add: " and LF from len */ len -= 12; branch_add = atoi(buff + 12); - state = CACHE_NEED_PS_DESCR; + state = CACHE_NEED_PS_COMMITID_OR_DESCR; } break; + case CACHE_NEED_PS_COMMITID_OR_DESCR: + if (strncmp(buff, "commitid:", 9) == 0) + { + /* remove prefix "commitid: " and LF from len */ + len -= 10; + strzncpy(cidbuff, buff + 10, MIN(len, CID_STR_MAX)); + state = CACHE_NEED_PS_DESCR; + break; + } + /* FALLTHROUGH */ case CACHE_NEED_PS_DESCR: if (strncmp(buff, "descr:", 6) == 0) state = CACHE_NEED_PS_EOD; @@ -296,8 +308,8 @@ time_t read_cache() case CACHE_NEED_PS_EOD: if (strcmp(buff, CACHE_DESCR_BOUNDARY) == 0) { - debug(DEBUG_STATUS, "patch set %s %s %s %s", datebuff, authbuff, logbuff, branchbuff); - ps = get_patch_set(datebuff, logbuff, authbuff, branchbuff, NULL); + debug(DEBUG_STATUS, "patch set %s %s %s %s %s", datebuff, authbuff, logbuff, branchbuff, cidbuff); + ps = get_patch_set(datebuff, logbuff, authbuff, branchbuff, cidbuff, NULL); /* the tag and tag_flags will be assigned by the resolve_global_symbols code * ps->tag = (strlen(tagbuff)) ? get_string(tagbuff) : NULL; * ps->tag_flags = tag_flags; @@ -336,6 +348,7 @@ time_t read_cache() tag_flags = 0; branchbuff[0] = 0; branch_add = 0; + cidbuff[0] = 0; logbuff[0] = 0; state = CACHE_NEED_PS; } @@ -523,6 +536,8 @@ static void dump_patch_set(FILE * fp, PatchSet * ps) fprintf(fp, "tag_flags: %d\n", ps->tag_flags); fprintf(fp, "branch: %s\n", ps->branch); fprintf(fp, "branch_add: %d\n", ps->branch_add); + if (ps->commitid[0]) + fprintf(fp, "commitid: %s\n", ps->commitid); fprintf(fp, "descr:\n%s", ps->descr); /* descr is guaranteed to end with LF */ fprintf(fp, CACHE_DESCR_BOUNDARY); fprintf(fp, "members:\n"); diff --git a/cvsps.c b/cvsps.c index 981cd78..b91f0c7 100644 --- a/cvsps.c +++ b/cvsps.c @@ -268,6 +268,7 @@ static void load_from_cvs() PatchSetMember * psm = NULL; char datebuff[20]; char authbuff[AUTH_STR_MAX]; + char cidbuff[CID_STR_MAX]; int logbufflen = LOG_STR_MAX + 1; char * logbuff = malloc(logbufflen); int loglen = 0; @@ -466,6 +467,19 @@ static void load_from_cvs() psm->post_rev->dead = 1; } + cidbuff[0] = 0; + p = strstr(buff, "commitid: "); + if (p) + { + char * op; + p += 10; + op = strchr(p, ';'); + if (op) + { + strzncpy(cidbuff, p, op - p + 1); + } + } + state = NEED_EOM; } break; @@ -474,7 +488,7 @@ static void load_from_cvs() { if (psm) { - PatchSet * ps = get_patch_set(datebuff, logbuff, authbuff, psm->post_rev->branch, psm); + PatchSet * ps = get_patch_set(datebuff, logbuff, authbuff, psm->post_rev->branch, cidbuff, psm); patch_set_add_member(ps, psm); } @@ -487,7 +501,7 @@ static void load_from_cvs() { if (psm) { - PatchSet * ps = get_patch_set(datebuff, logbuff, authbuff, psm->post_rev->branch, psm); + PatchSet * ps = get_patch_set(datebuff, logbuff, authbuff, psm->post_rev->branch, cidbuff, psm); patch_set_add_member(ps, psm); assign_pre_revision(psm, NULL); } @@ -1199,7 +1213,7 @@ static CvsFile * build_file_by_name(const char * fn) return retval; } -PatchSet * get_patch_set(const char * dte, const char * log, const char * author, const char * branch, PatchSetMember * psm) +PatchSet * get_patch_set(const char * dte, const char * log, const char * author, const char * branch, const char *commitid, PatchSetMember * psm) { PatchSet * retval = NULL, **find = NULL; int (*cmp1)(const void *,const void*) = (bkcvs) ? compare_patch_sets_bk : compare_patch_sets; @@ -1212,6 +1226,7 @@ PatchSet * get_patch_set(const char * dte, const char * log, const char * author convert_date(&retval->date, dte); retval->author = get_string(author); + retval->commitid = get_string(commitid); retval->descr = xstrdup(log); retval->branch = get_string(branch); @@ -1267,7 +1282,7 @@ PatchSet * get_patch_set(const char * dte, const char * log, const char * author else { debug(DEBUG_STATUS, "new patch set!"); - debug(DEBUG_STATUS, "%s %s %s", retval->author, retval->descr, dte); + debug(DEBUG_STATUS, "%s %s %s %s", retval->author, retval->descr, retval->commitid, dte); retval->min_date = retval->date - timestamp_fuzz_factor; retval->max_date = retval->date + timestamp_fuzz_factor; @@ -1639,7 +1654,7 @@ static int compare_patch_sets(const void * v_ps1, const void * v_ps2) int ret; time_t d, min, max; - /* We order by (author, descr, branch, members, date), but because of the fuzz factor + /* We order by (author, descr, branch, commitid, members, date), but because of the fuzz factor * we treat times within a certain distance as equal IFF the author * and descr match. */ @@ -1656,6 +1671,10 @@ static int compare_patch_sets(const void * v_ps1, const void * v_ps2) if (ret) return ret; + ret = strcmp(ps1->commitid, ps2->commitid); + if (ret) + return ret; + ret = compare_patch_sets_by_members(ps1, ps2); if (ret) return ret; @@ -1724,6 +1743,10 @@ static int compare_patch_sets_bytime(const PatchSet * ps1, const PatchSet * ps2) return ret; ret = strcmp(ps1->branch, ps2->branch); + if (ret) + return ret; + + ret = strcmp(ps1->commitid, ps2->commitid); return ret; } @@ -2072,6 +2095,7 @@ static PatchSet * create_patch_set() ps->tag = NULL; ps->tag_flags = 0; ps->branch_add = 0; + ps->commitid = ""; ps->funk_factor = 0; ps->ancestor_branch = NULL; CLEAR_LIST_NODE(&ps->collision_link); diff --git a/cvsps.h b/cvsps.h index 280a253..2638ebe 100644 --- a/cvsps.h +++ b/cvsps.h @@ -25,7 +25,7 @@ CvsFile * create_cvsfile(); CvsFileRevision * cvs_file_add_revision(CvsFile *, const char *); void cvs_file_add_symbol(CvsFile * file, const char * rev, const char * tag); char * cvs_file_add_branch(CvsFile *, const char *, const char *); -PatchSet * get_patch_set(const char *, const char *, const char *, const char *, PatchSetMember *); +PatchSet * get_patch_set(const char *, const char *, const char *, const char *, const char *, PatchSetMember *); PatchSetMember * create_patch_set_member(); CvsFileRevision * file_get_revision(CvsFile *, const char *); void patch_set_add_member(PatchSet * ps, PatchSetMember * psm); diff --git a/cvsps_types.h b/cvsps_types.h index dba145d..f3cc33f 100644 --- a/cvsps_types.h +++ b/cvsps_types.h @@ -10,6 +10,7 @@ #define LOG_STR_MAX 65536 #define AUTH_STR_MAX 64 +#define CID_STR_MAX 64 #define REV_STR_MAX 64 #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) @@ -113,6 +114,7 @@ struct _PatchSet char *descr; char *author; char *tag; + char *commitid; int tag_flags; char *branch; char *ancestor_branch; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org