packages: cvsps/cvsps-fixes.patch - up to 1a680d69dd39346bdf3674c6cb2460e11...

glen glen at pld-linux.org
Mon Jan 31 07:19:39 CET 2011


Author: glen                         Date: Mon Jan 31 06:19:38 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 1a680d69dd39346bdf3674c6cb2460e11e15c7d2

---- Files affected:
packages/cvsps:
   cvsps-fixes.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/cvsps/cvsps-fixes.patch
diff -u packages/cvsps/cvsps-fixes.patch:1.1 packages/cvsps/cvsps-fixes.patch:1.2
--- packages/cvsps/cvsps-fixes.patch:1.1	Sat Nov 10 20:11:42 2007
+++ packages/cvsps/cvsps-fixes.patch	Mon Jan 31 07:19:33 2011
@@ -1,7 +1,5 @@
-diff --git a/Makefile b/Makefile
-index 507c3e9..05ca856 100644
---- a/Makefile
-+++ b/Makefile
+--- b/Makefile
++++ b/Makefile	2011-01-31 08:14:42.829723957 +0200
 @@ -1,8 +1,8 @@
  MAJOR=2
  MINOR=1
@@ -13,7 +11,7 @@
  prefix?=/usr/local
  OBJS=\
  	cbtcommon/debug.o\
-@@ -20,6 +20,9 @@ OBJS=\
+@@ -20,6 +20,9 @@
  
  all: cvsps
  
@@ -23,8 +21,13 @@
  cvsps: $(OBJS)
  	$(CC) -o cvsps $(OBJS) -lz
  
-@@ -33,3 +36,27 @@ clean:
- 	rm -f cvsps *.o cbtcommon/*.o core
+@@ -32,4 +35,31 @@
++tags: *.c *.h cbtcommon/*.c cbtcommon/*.h
++	ctags *.c *.h cbtcommon/*.c cbtcommon/*.h
++
+ clean:
+-	rm -f cvsps *.o cbtcommon/*.o core
++	rm -f cvsps *.o cbtcommon/*.o core tags
  
  .PHONY: install clean
 +# DO NOT DELETE
@@ -51,8 +54,6 @@
 +cbtcommon/tcpsocket.o: cbtcommon/tcpsocket.h cbtcommon/debug.h
 +cbtcommon/tcpsocket.o: ./cbtcommon/inline.h cbtcommon/rcsid.h
 +cbtcommon/text_util.o: cbtcommon/text_util.h cbtcommon/rcsid.h
-diff --git a/cache.c b/cache.c
-index 4c51cf7..5f67a7c 100644
 --- a/cache.c
 +++ b/cache.c
 @@ -108,10 +108,19 @@ time_t read_cache()
@@ -170,8 +171,6 @@
  	    break;
  	case CR_DEAD:
  	    dead = atoi(c);
-diff --git a/cap.c b/cap.c
-index a6186f6..a1927df 100644
 --- a/cap.c
 +++ b/cap.c
 @@ -121,11 +121,19 @@ int check_version_string(const char * str, int req_major, int req_minor, int req
@@ -196,8 +195,6 @@
      }
  
      return (major > req_major || 
-diff --git a/cbtcommon/tcpsocket.c b/cbtcommon/tcpsocket.c
-index 27cc13a..f31060e 100644
 --- a/cbtcommon/tcpsocket.c
 +++ b/cbtcommon/tcpsocket.c
 @@ -185,20 +185,20 @@ tcp_connect(int sockfd, const char *rem_addr, unsigned short port)
@@ -224,11 +221,9 @@
    {
      /* nothing */
    }
-diff --git a/cvsps.1 b/cvsps.1
-index cea0faf..6cfdac6 100644
---- a/cvsps.1
-+++ b/cvsps.1
-@@ -83,7 +83,7 @@ some hacks which are not generally applicable.
+--- b/cvsps.1
++++ b/cvsps.1	2011-01-31 08:14:42.846391432 +0200
+@@ -83,7 +83,7 @@
  disable the use of rlog internally.  Note: rlog is
  required for stable PatchSet numbering.  Use with care.
  .TP
@@ -237,11 +232,17 @@
  send a custom set of options to diff, for example to increase
  the number of context lines, or change the diff format.
  .TP
-diff --git a/cvsps.c b/cvsps.c
-index 1e64e3c..981cd78 100644
---- a/cvsps.c
-+++ b/cvsps.c
-@@ -39,7 +39,8 @@ RCSID("$Id$");
+@@ -103,6 +103,7 @@
+ .TP
+ .B \-q
+ Be quiet about warnings.
++.TP
+ .B \-A
+ Show ancestor branch when a new branch is found.
+ .TP
+--- b/cvsps.c
++++ b/cvsps.c	2011-01-31 08:14:42.846391432 +0200
+@@ -39,7 +39,8 @@
  
  enum
  {
@@ -251,7 +252,7 @@
      NEED_SYMS,
      NEED_EOS,
      NEED_START_LOG,
-@@ -117,7 +118,9 @@ static int parse_args(int, char *[]);
+@@ -117,7 +118,9 @@
  static int parse_rc();
  static void load_from_cvs();
  static void init_paths();
@@ -262,7 +263,7 @@
  static CvsFileRevision * parse_revision(CvsFile * file, char * rev_str);
  static void assign_pre_revision(PatchSetMember *, CvsFileRevision * rev);
  static void check_print_patch_set(PatchSet *);
-@@ -260,12 +263,13 @@ static void load_from_cvs()
+@@ -260,12 +263,13 @@
  {
      FILE * cvsfp;
      char buff[BUFSIZ];
@@ -278,7 +279,7 @@
      int loglen = 0;
      int have_log = 0;
      char cmd[BUFSIZ];
-@@ -273,6 +277,12 @@ static void load_from_cvs()
+@@ -273,6 +277,12 @@
      char use_rep_buff[PATH_MAX];
      char * ltype;
  
@@ -291,7 +292,7 @@
      if (!no_rlog && !test_log_file && cvs_check_cap(CAP_HAVE_RLOG))
      {
  	ltype = "rlog";
-@@ -298,12 +308,12 @@ static void load_from_cvs()
+@@ -298,12 +308,12 @@
  	 * which is necessary to fill in the pre_rev stuff for a 
  	 * PatchSetMember
  	 */
@@ -306,7 +307,7 @@
      }
      
      debug(DEBUG_STATUS, "******* USING CMD %s", cmd);
-@@ -339,10 +349,26 @@ static void load_from_cvs()
+@@ -339,10 +349,26 @@
  
  	switch(state)
  	{
@@ -335,7 +336,7 @@
  	case NEED_SYMS:
  	    if (strncmp(buff, "symbolic names:", 15) == 0)
  		state = NEED_EOS;
-@@ -471,7 +497,7 @@ static void load_from_cvs()
+@@ -471,7 +497,7 @@
  		have_log = 0;
  		psm = NULL;
  		file = NULL;
@@ -344,7 +345,7 @@
  	    }
  	    else
  	    {
-@@ -480,24 +506,22 @@ static void load_from_cvs()
+@@ -480,24 +506,22 @@
  		 */
  		if (have_log || !is_revision_metadata(buff))
  		{
@@ -381,7 +382,7 @@
  			}
  
  			debug(DEBUG_STATUS, "appending %s to log", buff);
-@@ -524,7 +548,7 @@ static void load_from_cvs()
+@@ -524,7 +548,7 @@
  	exit(1);
      }
  
@@ -390,7 +391,7 @@
      {
  	debug(DEBUG_APPERROR, "Error: Log file parsing error. (%d)  Use -v to debug", state);
  	exit(1);
-@@ -1038,8 +1062,8 @@ static void init_paths()
+@@ -1038,8 +1062,8 @@
       *
       * NOTE: because of some bizarre 'feature' in cvs, when 'rlog' is used
       * (instead of log) it gives the 'real' RCS file path, which can be different
@@ -401,7 +402,7 @@
       */
      strip_path_len = snprintf(strip_path, PATH_MAX, "%s/%s/", p, repository_path);
  
-@@ -1052,9 +1076,8 @@ static void init_paths()
+@@ -1052,9 +1076,8 @@
      debug(DEBUG_STATUS, "strip_path: %s", strip_path);
  }
  
@@ -412,7 +413,7 @@
      char fn[PATH_MAX];
      int len = strlen(buff + 10);
      char * p;
-@@ -1129,6 +1152,28 @@ static CvsFile * parse_file(const char * buff)
+@@ -1129,6 +1152,28 @@
  
      debug(DEBUG_STATUS, "stripped filename %s", fn);
  
@@ -441,7 +442,7 @@
      retval = (CvsFile*)get_hash_object(file_hash, fn);
  
      if (!retval)
-@@ -2104,6 +2149,11 @@ static void parse_sym(CvsFile * file, char * sym)
+@@ -2104,6 +2149,11 @@
      
      if (!get_branch_ext(rev, eot, &leaf))
      {
@@ -453,7 +454,7 @@
  	debug(DEBUG_APPERROR, "malformed revision");
  	exit(1);
      }
-@@ -2384,8 +2434,31 @@ void patch_set_add_member(PatchSet * ps, PatchSetMember * psm)
+@@ -2384,8 +2434,31 @@
      for (next = ps->members.next; next != &ps->members; next = next->next) 
      {
  	PatchSetMember * m = list_entry(next, PatchSetMember, link);
@@ -487,7 +488,22 @@
      }
  
      psm->ps = ps;
-@@ -2576,7 +2649,7 @@ static void determine_branch_ancestor(PatchSet * ps, PatchSet * head_ps)
+@@ -2398,11 +2471,10 @@
+     if (psm->post_rev->dead)
+     {
+ 	/* 
+-	 * we expect a 'file xyz initially added on branch abc' here
+-	 * but there can only be one such member in a given patchset
++	 * We expect a 'file xyz initially added on branch abc' here.
++	 * There can only be several such member in a given patchset,
++	 * since cvs only includes the file basename in the log message.
+ 	 */
+-	if (psm->ps->branch_add)
+-	    debug(DEBUG_APPMSG1, "WARNING: branch_add already set!");
+ 	psm->ps->branch_add = 1;
+     }
+ }
+@@ -2576,7 +2648,7 @@
  	 * note: rev is the pre-commit revision, not the post-commit
  	 */
  	if (!head_ps->ancestor_branch)
@@ -496,8 +512,6 @@
  	else if (strcmp(ps->branch, rev->branch) == 0)
  	    continue;
  	else if (strcmp(head_ps->ancestor_branch, "HEAD") == 0)
-diff --git a/cvsps_types.h b/cvsps_types.h
-index b41e2a9..dba145d 100644
 --- a/cvsps_types.h
 +++ b/cvsps_types.h
 @@ -8,7 +8,7 @@
@@ -509,3 +523,21 @@
  #define AUTH_STR_MAX 64
  #define REV_STR_MAX 64
  #define MIN(a, b) ((a) < (b) ? (a) : (b))
+--- a/cbtcommon/list.h	2005-05-26 06:39:40.000000000 +0300
++++ b/cbtcommon/list.h	2011-01-31 08:14:42.829723957 +0200
+@@ -23,6 +23,7 @@
+  */
+ 
+ #include "inline.h"
++#include <stddef.h>
+ 
+ struct list_head {
+         struct list_head *next, *prev;
+@@ -107,6 +108,6 @@
+ }
+ 
+ #define list_entry(ptr, type, member) \
+-        ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
++   ((type *)((char *)(ptr)-offsetof(type, member)))
+ 
+ #endif /* _COMMON_LIST_H */
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cvsps/cvsps-fixes.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list