Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/convert/subversion.py @ 4797:d00ca99bc54e
convert svn: minor improvement to tag detection.
The better way is probably to list the latest tags directory and
look up the last log message for each entry. This is surprisingly
annoying to do.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Tue, 03 Jul 2007 20:22:39 -0700 |
parents | 83c1bbb934ec |
children | 15a3cbfc6568 |
comparison
equal
deleted
inserted
replaced
4796:83c1bbb934ec | 4797:d00ca99bc54e |
---|---|
530 tags = {} | 530 tags = {} |
531 def parselogentry(*arg, **args): | 531 def parselogentry(*arg, **args): |
532 orig_paths, revnum, author, date, message, pool = arg | 532 orig_paths, revnum, author, date, message, pool = arg |
533 orig_paths = svn_paths(orig_paths) | 533 orig_paths = svn_paths(orig_paths) |
534 for path in orig_paths: | 534 for path in orig_paths: |
535 if not path.startswith('/tags/'): | |
536 continue | |
535 ent = orig_paths[path] | 537 ent = orig_paths[path] |
536 source = ent.copyfrom_path | 538 source = ent.copyfrom_path |
537 rev = ent.copyfrom_rev | 539 rev = ent.copyfrom_rev |
538 tag = path.split('/', 2)[2] | 540 tag = path.split('/', 2)[2] |
539 tags[tag] = self.rev(rev, module=source) | 541 tags[tag] = self.rev(rev, module=source) |
540 | 542 |
541 start = self.revnum(self.head) | 543 start = self.revnum(self.head) |
542 try: | 544 try: |
543 svn.ra.get_log(self.ra, ['/tags'], start, 0, 1, True, False, | 545 svn.ra.get_log(self.ra, ['/tags'], 0, start, 0, True, False, |
544 parselogentry) | 546 parselogentry) |
545 return tags | 547 return tags |
546 except SubversionException: | 548 except SubversionException: |
547 self.ui.note('no tags found at revision %d\n' % start) | 549 self.ui.note('no tags found at revision %d\n' % start) |
548 return {} | 550 return {} |