Show More
@@ -34,7 +34,8 b' class logentry(object):' | |||
|
34 | 34 | .revision - revision number as tuple |
|
35 | 35 | .tags - list of tags on the file |
|
36 | 36 | .synthetic - is this a synthetic "file ... added on ..." revision? |
|
37 |
.mergepoint- the branch that has been merged from |
|
|
37 | .mergepoint- the branch that has been merged from | |
|
38 | (if present in rlog output) | |
|
38 | 39 | ''' |
|
39 | 40 | def __init__(self, **entries): |
|
40 | 41 | self.__dict__.update(entries) |
@@ -105,14 +106,18 b' def createlog(ui, directory=None, root="' | |||
|
105 | 106 | re_00 = re.compile('RCS file: (.+)$') |
|
106 | 107 | re_01 = re.compile('cvs \\[r?log aborted\\]: (.+)$') |
|
107 | 108 | re_02 = re.compile('cvs (r?log|server): (.+)\n$') |
|
108 |
re_03 = re.compile("(Cannot access.+CVSROOT)| |
|
|
109 | re_03 = re.compile("(Cannot access.+CVSROOT)|" | |
|
110 | "(can't create temporary directory.+)$") | |
|
109 | 111 | re_10 = re.compile('Working file: (.+)$') |
|
110 | 112 | re_20 = re.compile('symbolic names:') |
|
111 | 113 | re_30 = re.compile('\t(.+): ([\\d.]+)$') |
|
112 | 114 | re_31 = re.compile('----------------------------$') |
|
113 |
re_32 = re.compile('======================================= |
|
|
115 | re_32 = re.compile('=======================================' | |
|
116 | '======================================$') | |
|
114 | 117 | re_50 = re.compile('revision ([\\d.]+)(\s+locked by:\s+.+;)?$') |
|
115 |
re_60 = re.compile(r'date:\s+(.+);\s+author:\s+(.+);\s+state:\s+(.+?); |
|
|
118 | re_60 = re.compile(r'date:\s+(.+);\s+author:\s+(.+);\s+state:\s+(.+?);' | |
|
119 | r'(\s+lines:\s+(\+\d+)?\s+(-\d+)?;)?' | |
|
120 | r'(.*mergepoint:\s+([^;]+);)?') | |
|
116 | 121 | re_70 = re.compile('branches: (.+);$') |
|
117 | 122 | |
|
118 | 123 | file_added_re = re.compile(r'file [^/]+ was (initially )?added on branch') |
@@ -282,7 +287,8 b' def createlog(ui, directory=None, root="' | |||
|
282 | 287 | if re_31.match(line): |
|
283 | 288 | state = 5 |
|
284 | 289 | else: |
|
285 |
assert not re_32.match(line), _('must have at least |
|
|
290 | assert not re_32.match(line), _('must have at least ' | |
|
291 | 'some revisions') | |
|
286 | 292 | |
|
287 | 293 | elif state == 5: |
|
288 | 294 | # expecting revision number and possibly (ignored) lock indication |
@@ -308,7 +314,9 b' def createlog(ui, directory=None, root="' | |||
|
308 | 314 | if len(d.split()) != 3: |
|
309 | 315 | # cvs log dates always in GMT |
|
310 | 316 | d = d + ' UTC' |
|
311 |
e.date = util.parsedate(d, ['%y/%m/%d %H:%M:%S', |
|
|
317 | e.date = util.parsedate(d, ['%y/%m/%d %H:%M:%S', | |
|
318 | '%Y/%m/%d %H:%M:%S', | |
|
319 | '%Y-%m-%d %H:%M:%S']) | |
|
312 | 320 | e.author = scache(match.group(2)) |
|
313 | 321 | e.dead = match.group(3).lower() == 'dead' |
|
314 | 322 | |
@@ -443,7 +451,8 b' class changeset(object):' | |||
|
443 | 451 | .parents - list of one or two parent changesets |
|
444 | 452 | .tags - list of tags on this changeset |
|
445 | 453 | .synthetic - from synthetic revision "file ... added on branch ..." |
|
446 |
.mergepoint- the branch that has been merged from |
|
|
454 | .mergepoint- the branch that has been merged from | |
|
455 | (if present in rlog output) | |
|
447 | 456 | ''' |
|
448 | 457 | def __init__(self, **entries): |
|
449 | 458 | self.__dict__.update(entries) |
@@ -689,9 +698,10 b' def createchangeset(ui, log, fuzz=60, me' | |||
|
689 | 698 | |
|
690 | 699 | |
|
691 | 700 | def debugcvsps(ui, *args, **opts): |
|
692 |
'''Read CVS rlog for current directory or named path in |
|
|
693 |
convert the log to changesets based on matching |
|
|
694 | ||
|
701 | '''Read CVS rlog for current directory or named path in | |
|
702 | repository, and convert the log to changesets based on matching | |
|
703 | commit log entries and dates. | |
|
704 | ''' | |
|
695 | 705 | if opts["new_cache"]: |
|
696 | 706 | cache = "write" |
|
697 | 707 | elif opts["update_cache"]: |
@@ -724,7 +734,8 b' def debugcvsps(ui, *args, **opts):' | |||
|
724 | 734 | |
|
725 | 735 | if opts["ancestors"]: |
|
726 | 736 | if cs.branch not in branches and cs.parents and cs.parents[0].id: |
|
727 |
ancestors[cs.branch] = changesets[cs.parents[0].id-1].branch, |
|
|
737 | ancestors[cs.branch] = (changesets[cs.parents[0].id-1].branch, | |
|
738 | cs.parents[0].id) | |
|
728 | 739 | branches[cs.branch] = cs.id |
|
729 | 740 | |
|
730 | 741 | # limit by branches |
@@ -736,7 +747,8 b' def debugcvsps(ui, *args, **opts):' | |||
|
736 | 747 | # bug-for-bug compatibility with cvsps. |
|
737 | 748 | ui.write('---------------------\n') |
|
738 | 749 | ui.write('PatchSet %d \n' % cs.id) |
|
739 |
ui.write('Date: %s\n' % util.datestr(cs.date, |
|
|
750 | ui.write('Date: %s\n' % util.datestr(cs.date, | |
|
751 | '%Y/%m/%d %H:%M:%S %1%2')) | |
|
740 | 752 | ui.write('Author: %s\n' % cs.author) |
|
741 | 753 | ui.write('Branch: %s\n' % (cs.branch or 'HEAD')) |
|
742 | 754 | ui.write('Tag%s: %s \n' % (['', 's'][len(cs.tags)>1], |
General Comments 0
You need to be logged in to leave comments.
Login now