##// END OF EJS Templates
convert/svn: ignore composite tags...
Patrick Mezard -
r8248:d093e576 default
parent child Browse files
Show More
@@ -460,11 +460,34 b' class svn_source(converter_source):'
460 tag[:2] = [tagpath, sourcerev]
460 tag[:2] = [tagpath, sourcerev]
461 break
461 break
462 else:
462 else:
463 pendings.append([source, sourcerev, dest.split('/')[-1]])
463 pendings.append([source, sourcerev, dest])
464
465 # Filter out tags with children coming from different
466 # parts of the repository like:
467 # /tags/tag.1 (from /trunk:10)
468 # /tags/tag.1/foo (from /branches/foo:12)
469 # Here/tags/tag.1 discarded as well as its children.
470 # It happens with tools like cvs2svn. Such tags cannot
471 # be represented in mercurial.
472 addeds = dict((p, e.copyfrom_path) for p,e
473 in origpaths.iteritems() if e.action == 'A')
474 badroots = set()
475 for destroot in addeds:
476 for source, sourcerev, dest in pendings:
477 if (not dest.startswith(destroot + '/')
478 or source.startswith(addeds[destroot] + '/')):
479 continue
480 badroots.add(destroot)
481 break
482
483 for badroot in badroots:
484 pendings = [p for p in pendings if p[2] != badroot
485 and not p[2].startswith(badroot + '/')]
464
486
465 # Tell tag renamings from tag creations
487 # Tell tag renamings from tag creations
466 remainings = []
488 remainings = []
467 for source, sourcerev, tagname in pendings:
489 for source, sourcerev, dest in pendings:
490 tagname = dest.split('/')[-1]
468 if source.startswith(srctagspath):
491 if source.startswith(srctagspath):
469 remainings.append([source, sourcerev, tagname])
492 remainings.append([source, sourcerev, tagname])
470 continue
493 continue
General Comments 0
You need to be logged in to leave comments. Login now