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 REV_STR_MAX 64
14 #define MIN(a, b) ((a) < (b) ? (a) : (b))
15 #define MAX(a, b) ((a) > (b) ? (a) : (b))
17 typedef struct _CvsFile CvsFile
;
18 typedef struct _PatchSet PatchSet
;
19 typedef struct _PatchSetMember PatchSetMember
;
20 typedef struct _PatchSetRange PatchSetRange
;
21 typedef struct _CvsFileRevision CvsFileRevision
;
22 typedef struct _GlobalSymbol GlobalSymbol
;
23 typedef struct _Tag Tag
;
25 struct _CvsFileRevision
32 * In the cvs cvs repository (ccvs project) there are tagged
33 * revisions that don't exist. track 'confirmed' revisions
34 * so as to not let them screw us up.
39 * A revision can be part of many PatchSets because it may
40 * be the branch point of many branches (as a pre_rev).
41 * It should, however, be the 'post_rev' of only one
42 * PatchSetMember. The 'main line of inheritence' is
43 * kept in pre_psm, and all 'branch revisions' are kept
46 PatchSetMember
* pre_psm
;
47 PatchSetMember
* post_psm
;
48 struct list_head branch_children
;
51 * for linking this 'first branch rev' into the parent branch_children
53 struct list_head link
;
56 * A list of all Tag structures tagging this revision
58 struct list_head tags
;
64 struct hash_table
* revisions
; /* rev_str to revision [CvsFileRevision*] */
65 struct hash_table
* branches
; /* branch to branch_sym [char*] */
66 struct hash_table
* branches_sym
; /* branch_sym to branch [char*] */
67 struct hash_table
* symbols
; /* tag to revision [CvsFileRevision*] */
69 * this is a hack. when we initially create entries in the symbol hash
70 * we don't have the branch info, so the CvsFileRevisions get created
71 * with the branch attribute NULL. Later we need to resolve these.
76 struct _PatchSetMember
78 CvsFileRevision
* pre_rev
;
79 CvsFileRevision
* post_rev
;
83 * bad_funk is only set w.r.t the -r tags
86 struct list_head link
;
90 * these are bit flags for tag flags
91 * they apply to any patchset that
92 * has an assoctiated tag
95 #define TAG_INVALID 0x2
97 /* values for funk_factor. they apply
98 * only to the -r tags, to patchsets
99 * that have an odd relationship to the
102 #define FNK_SHOW_SOME 1
103 #define FNK_SHOW_ALL 2
104 #define FNK_HIDE_ALL 3
105 #define FNK_HIDE_SOME 4
118 char *ancestor_branch
;
119 struct list_head members
;
121 * A 'branch add' patch set is a bogus patch set created automatically
122 * when a 'file xyz was initially added on branch abc'
123 * we want to ignore these. fortunately, there's a way to detect them
124 * without resorting to looking at the log message.
128 * If the '-r' option specifies a funky tag, we will need to detect the
129 * PatchSets that come chronologically before the tag, but are logically
130 * after, and vice-versa if a second -r option was specified
134 /* for putting onto a list */
135 struct list_head all_link
;
136 struct list_head collision_link
;
139 struct _PatchSetRange
143 struct list_head link
;
150 struct list_head tags
;
156 CvsFileRevision
* rev
;
158 struct list_head global_link
;
159 struct list_head rev_link
;
162 #endif /* CVSPS_TYPES_H */