2011-06-26 05:03:12 +00:00
|
|
|
enum {
|
|
|
|
MAXPATH = 1024,
|
|
|
|
BUFSZ = 1024,
|
|
|
|
HASHSZ = 20,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct Revlog Revlog;
|
|
|
|
typedef struct Revmap Revmap;
|
|
|
|
typedef struct Revinfo Revinfo;
|
|
|
|
typedef struct Revtree Revtree;
|
|
|
|
typedef struct Revnode Revnode;
|
|
|
|
typedef struct Revfile Revfile;
|
|
|
|
|
|
|
|
struct Revmap
|
|
|
|
{
|
|
|
|
int rev;
|
|
|
|
int p1rev;
|
|
|
|
int p2rev;
|
|
|
|
int baserev;
|
|
|
|
int linkrev;
|
|
|
|
|
|
|
|
uchar hash[HASHSZ];
|
|
|
|
|
|
|
|
int flags;
|
|
|
|
|
|
|
|
vlong hoff;
|
|
|
|
vlong hlen;
|
|
|
|
|
|
|
|
vlong flen;
|
|
|
|
|
|
|
|
void *aux;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Revlog
|
|
|
|
{
|
2011-06-28 01:51:05 +00:00
|
|
|
Ref;
|
|
|
|
|
2011-06-30 01:05:10 +00:00
|
|
|
Revlog *next;
|
|
|
|
|
2011-06-28 01:51:05 +00:00
|
|
|
char *path;
|
|
|
|
|
2011-06-26 05:03:12 +00:00
|
|
|
int ifd;
|
|
|
|
int dfd;
|
|
|
|
|
2011-06-27 05:43:25 +00:00
|
|
|
vlong ioff;
|
|
|
|
|
2011-06-26 05:03:12 +00:00
|
|
|
int nmap;
|
|
|
|
Revmap *map;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Revnode
|
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
uchar *hash;
|
|
|
|
uvlong path;
|
|
|
|
|
|
|
|
Revnode *up;
|
|
|
|
Revnode *next;
|
|
|
|
Revnode *down;
|
2011-06-28 01:51:05 +00:00
|
|
|
Revnode *before;
|
2011-06-27 11:27:32 +00:00
|
|
|
|
|
|
|
char mode;
|
2011-06-26 05:03:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Revinfo
|
|
|
|
{
|
|
|
|
uchar chash[HASHSZ];
|
|
|
|
uchar mhash[HASHSZ];
|
|
|
|
|
|
|
|
char *who;
|
|
|
|
char *why;
|
2011-06-30 01:05:10 +00:00
|
|
|
ulong when;
|
2011-06-27 08:07:19 +00:00
|
|
|
|
|
|
|
vlong logoff;
|
|
|
|
vlong loglen;
|
2011-06-26 05:03:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Revtree
|
|
|
|
{
|
|
|
|
Ref;
|
|
|
|
int level;
|
|
|
|
Revnode *root;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Revfile
|
|
|
|
{
|
|
|
|
int level;
|
|
|
|
|
|
|
|
Revinfo *info;
|
|
|
|
Revtree *tree;
|
|
|
|
Revnode *node;
|
2011-06-28 01:51:05 +00:00
|
|
|
Revlog *rlog;
|
2011-06-26 05:03:12 +00:00
|
|
|
|
|
|
|
char *buf;
|
|
|
|
int fd;
|
|
|
|
};
|