2 * Copyright 2001, 2002, 2003 David Mansfield and Cobite, Inc.
3 * See COPYING file for license information
11 #define LOG_STR_MAX 65536
12 #define AUTH_STR_MAX 64
13 #define CID_STR_MAX 64
14 #define REV_STR_MAX 64
15 #define MIN(a, b) ((a) < (b) ? (a) : (b))
16 #define MAX(a, b) ((a) > (b) ? (a) : (b))
18 typedef struct _CvsFile CvsFile
;
19 typedef struct _PatchSet PatchSet
;
20 typedef struct _PatchSetMember PatchSetMember
;
21 typedef struct _PatchSetRange PatchSetRange
;
22 typedef struct _CvsFileRevision CvsFileRevision
;
23 typedef struct _GlobalSymbol GlobalSymbol
;
24 typedef struct _Tag Tag
;
26 struct _CvsFileRevision
33 * In the cvs cvs repository (ccvs project) there are tagged
34 * revisions that don't exist. track 'confirmed' revisions
35 * so as to not let them screw us up.
40 * A revision can be part of many PatchSets because it may
41 * be the branch point of many branches (as a pre_rev).
42 * It should, however, be the 'post_rev' of only one
43 * PatchSetMember. The 'main line of inheritence' is
44 * kept in pre_psm, and all 'branch revisions' are kept
47 PatchSetMember
* pre_psm
;
48 PatchSetMember
* post_psm
;
49 struct list_head branch_children
;
52 * for linking this 'first branch rev' into the parent branch_children
54 struct list_head link
;
57 * A list of all Tag structures tagging this revision
59 struct list_head tags
;
65 struct hash_table
* revisions
; /* rev_str to revision [CvsFileRevision*] */
66 struct hash_table
* branches
; /* branch to branch_sym [char*] */
67 struct hash_table
* branches_sym
; /* branch_sym to branch [char*] */
68 struct hash_table
* symbols
; /* tag to revision [CvsFileRevision*] */
70 * this is a hack. when we initially create entries in the symbol hash
71 * we don't have the branch info, so the CvsFileRevisions get created
72 * with the branch attribute NULL. Later we need to resolve these.
77 struct _PatchSetMember
79 CvsFileRevision
* pre_rev
;
80 CvsFileRevision
* post_rev
;
84 * bad_funk is only set w.r.t the -r tags
87 struct list_head link
;
91 * these are bit flags for tag flags
92 * they apply to any patchset that
93 * has an assoctiated tag
96 #define TAG_INVALID 0x2
98 /* values for funk_factor. they apply
99 * only to the -r tags, to patchsets
100 * that have an odd relationship to the
103 #define FNK_SHOW_SOME 1
104 #define FNK_SHOW_ALL 2
105 #define FNK_HIDE_ALL 3
106 #define FNK_HIDE_SOME 4
120 char *ancestor_branch
;
121 struct list_head members
;
123 * A 'branch add' patch set is a bogus patch set created automatically
124 * when a 'file xyz was initially added on branch abc'
125 * we want to ignore these. fortunately, there's a way to detect them
126 * without resorting to looking at the log message.
130 * If the '-r' option specifies a funky tag, we will need to detect the
131 * PatchSets that come chronologically before the tag, but are logically
132 * after, and vice-versa if a second -r option was specified
136 /* for putting onto a list */
137 struct list_head all_link
;
138 struct list_head collision_link
;
141 struct _PatchSetRange
145 struct list_head link
;
152 struct list_head tags
;
158 CvsFileRevision
* rev
;
160 struct list_head global_link
;
161 struct list_head rev_link
;
164 #endif /* CVSPS_TYPES_H */