~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to baz2bzr

  • Committer: Aaron Bentley
  • Date: 2005-06-01 23:18:28 UTC
  • Revision ID: abentley@bruiser-20050601231828-9083a3d5b1aaae74
Ensured temp dir is on same filesystem as output dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
    >>> teardown_environ(q)
185
185
    """
186
186
    progress_bar = ProgressBar()
187
 
    tempdir = tempfile.mkdtemp(prefix="baz2bzr")
 
187
    tempdir = tempfile.mkdtemp(prefix="baz2bzr-",
 
188
                               dir=os.path.dirname(output_dir))
188
189
    try:
189
190
        if not fancy:
190
191
            print "not fancy"
324
325
    doctest.testmod()
325
326
elif len(sys.argv) == 3:
326
327
    try:
327
 
        output_dir = sys.argv[2]
 
328
        output_dir = os.path.realpath(sys.argv[2])
328
329
        if os.path.exists(output_dir):
329
330
            raise UserError("Directory \"%s\" already exists" % output_dir)
330
331
        import_version(output_dir, pybaz.Version(sys.argv[1]))