~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to baz_import.py

  • Committer: Robert Collins
  • Date: 2006-04-24 01:35:08 UTC
  • mto: (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 366.
  • Revision ID: robertc@robertcollins.net-20060424013508-2d37e47814d9493e
Support importing into empty branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
        branch = Branch.open(output_dir)
288
288
        last_patch = get_last_revision(branch)
289
289
        if last_patch is None:
290
 
            raise NotPreviousImport(branch.base)
291
 
        if version is None:
 
290
            if branch.last_revision() != None:
 
291
                raise NotPreviousImport(branch.base)
 
292
        elif version is None:
292
293
            version = last_patch.version
293
294
    elif version is None:
294
295
        raise UserError("No version specified, and directory does not exist.")