00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __URL_H__
00010 #define __URL_H__
00011
00012 #include "actions.h"
00013 #include "global.h"
00014
00019 extern char **url__parm_list;
00021 extern int url__parm_list_used;
00022
00024 work_t url__work;
00025
00026
00028 int url__load_list(char *dir, int reserve_space);
00030 int url__load_nonempty_list(char *dir, int reserve_space);
00032 int url__output_list(void);
00033
00035 int url__find_by_name(const char *name, struct url_t **storage);
00037 int url__find_by_intnum(int intnum, struct url_t **storage);
00039 int url__find_by_url(char *url, struct url_t **storage);
00040
00042 int url__full_url(struct estat *sts, char **url);
00045 int url__other_full_url(struct estat *sts, struct url_t *url, char **output);
00046
00048 int url__parse(char *input, struct url_t *storage, int *def_parms);
00050 int url__open_session(svn_ra_session_t **session, char **missing_dirs);
00052 int url__find(char *url, struct url_t **output);
00053
00056 int url__current_has_precedence(struct url_t *to_compare);
00058 int url__insert_or_replace(char *eurl,
00059 struct url_t **storage,
00060 int *existed);
00062 int url__allocate(int reserve_space);
00063
00065 int url__close_session(struct url_t *cur);
00067 int url__close_sessions(void);
00068
00070 int url__mark_todo(void);
00072 int url__store_url_name(char *parm);
00074 static inline int url__to_be_handled(const struct url_t *url)
00075 {
00076 return (!url__parm_list_used) || url->to_be_handled;
00077 }
00078
00079
00082 int url__iterator2(svn_revnum_t *target_rev,
00083 int only_if_count, char **missing);
00084 static inline int url__iterator(svn_revnum_t *target_rev)
00085 {
00086 return url__iterator2(target_rev, 0, NULL);
00087 }
00088
00089
00100 static inline int url__sorter(struct url_t *u1, struct url_t *u2)
00101 {
00102 if (u1->priority == u2->priority)
00103 return strcmp(u1->url, u2->url);
00104 else
00105 return u1->priority - u2->priority;
00106 }
00107
00109 int url__indir_sorter(const void *a, const void *b);
00110
00111
00114 int url__canonical_rev( struct url_t *url, svn_revnum_t *rev);
00115
00116 #endif