27 |
27 |
28 pickle = util.pickle |
28 pickle = util.pickle |
29 |
29 |
30 |
30 |
31 class logentry(object): |
31 class logentry(object): |
32 '''Class logentry has the following attributes: |
32 """Class logentry has the following attributes: |
33 .author - author name as CVS knows it |
33 .author - author name as CVS knows it |
34 .branch - name of branch this revision is on |
34 .branch - name of branch this revision is on |
35 .branches - revision tuple of branches starting at this revision |
35 .branches - revision tuple of branches starting at this revision |
36 .comment - commit message |
36 .comment - commit message |
37 .commitid - CVS commitid or None |
37 .commitid - CVS commitid or None |
38 .date - the commit date as a (time, tz) tuple |
38 .date - the commit date as a (time, tz) tuple |
39 .dead - true if file revision is dead |
39 .dead - true if file revision is dead |
40 .file - Name of file |
40 .file - Name of file |
41 .lines - a tuple (+lines, -lines) or None |
41 .lines - a tuple (+lines, -lines) or None |
42 .parent - Previous revision of this entry |
42 .parent - Previous revision of this entry |
43 .rcs - name of file as returned from CVS |
43 .rcs - name of file as returned from CVS |
44 .revision - revision number as tuple |
44 .revision - revision number as tuple |
45 .tags - list of tags on the file |
45 .tags - list of tags on the file |
46 .synthetic - is this a synthetic "file ... added on ..." revision? |
46 .synthetic - is this a synthetic "file ... added on ..." revision? |
47 .mergepoint - the branch that has been merged from (if present in |
47 .mergepoint - the branch that has been merged from (if present in |
48 rlog output) or None |
48 rlog output) or None |
49 .branchpoints - the branches that start at the current entry or empty |
49 .branchpoints - the branches that start at the current entry or empty |
50 ''' |
50 """ |
51 |
51 |
52 def __init__(self, **entries): |
52 def __init__(self, **entries): |
53 self.synthetic = False |
53 self.synthetic = False |
54 self.__dict__.update(entries) |
54 self.__dict__.update(entries) |
55 |
55 |
578 |
578 |
579 return log |
579 return log |
580 |
580 |
581 |
581 |
582 class changeset(object): |
582 class changeset(object): |
583 '''Class changeset has the following attributes: |
583 """Class changeset has the following attributes: |
584 .id - integer identifying this changeset (list index) |
584 .id - integer identifying this changeset (list index) |
585 .author - author name as CVS knows it |
585 .author - author name as CVS knows it |
586 .branch - name of branch this changeset is on, or None |
586 .branch - name of branch this changeset is on, or None |
587 .comment - commit message |
587 .comment - commit message |
588 .commitid - CVS commitid or None |
588 .commitid - CVS commitid or None |
589 .date - the commit date as a (time,tz) tuple |
589 .date - the commit date as a (time,tz) tuple |
590 .entries - list of logentry objects in this changeset |
590 .entries - list of logentry objects in this changeset |
591 .parents - list of one or two parent changesets |
591 .parents - list of one or two parent changesets |
592 .tags - list of tags on this changeset |
592 .tags - list of tags on this changeset |
593 .synthetic - from synthetic revision "file ... added on branch ..." |
593 .synthetic - from synthetic revision "file ... added on branch ..." |
594 .mergepoint- the branch that has been merged from or None |
594 .mergepoint- the branch that has been merged from or None |
595 .branchpoints- the branches that start at the current entry or empty |
595 .branchpoints- the branches that start at the current entry or empty |
596 ''' |
596 """ |
597 |
597 |
598 def __init__(self, **entries): |
598 def __init__(self, **entries): |
599 self.id = None |
599 self.id = None |
600 self.synthetic = False |
600 self.synthetic = False |
601 self.__dict__.update(entries) |
601 self.__dict__.update(entries) |
943 |
943 |
944 return changesets |
944 return changesets |
945 |
945 |
946 |
946 |
947 def debugcvsps(ui, *args, **opts): |
947 def debugcvsps(ui, *args, **opts): |
948 '''Read CVS rlog for current directory or named path in |
948 """Read CVS rlog for current directory or named path in |
949 repository, and convert the log to changesets based on matching |
949 repository, and convert the log to changesets based on matching |
950 commit log entries and dates. |
950 commit log entries and dates. |
951 ''' |
951 """ |
952 opts = pycompat.byteskwargs(opts) |
952 opts = pycompat.byteskwargs(opts) |
953 if opts[b"new_cache"]: |
953 if opts[b"new_cache"]: |
954 cache = b"write" |
954 cache = b"write" |
955 elif opts[b"update_cache"]: |
955 elif opts[b"update_cache"]: |
956 cache = b"update" |
956 cache = b"update" |