~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to baz_import.py

  • Committer: Robert Collins
  • Date: 2005-10-22 13:40:09 UTC
  • mto: (147.1.39) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20051022134009-54f2d14b5fc1d2cb
dont block archive wide baz-imports when a single version fails dur to either an unbuildable revision or a diverged branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
634
634
        printer("importing %s into %s" % (version, target))
635
635
        if not os.path.exists(os.path.dirname(target)):
636
636
            os.makedirs(os.path.dirname(target))
637
 
        import_version(target, version, printer)
 
637
        try:
 
638
            import_version(target, version, printer)
 
639
        except pybaz.errors.ExecProblem,e:
 
640
            if str(e).find('The requested revision cannot be built.') != -1:
 
641
                printer("Skipping version %s as it cannot be built due"
 
642
                        " to a missing parent archive." % version)
 
643
            else:
 
644
                raise
 
645
        except UserError, e:
 
646
            if str(e).find('already exists, and the last revision ') != -1:
 
647
                printer("Skipping version %s as it has had commits made"
 
648
                        " since it was converted to bzr." % version)
 
649
            else:
 
650
                raise
638
651
 
639
652
 
640
653
def map_namespace(a_version):