~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to baz2bzr

  • Committer: Aaron Bentley
  • Date: 2005-06-15 15:53:52 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050615155352-afb1ccd8c20839c7
updated docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#    along with this program; if not, write to the Free Software
18
18
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
19
 
 
20
from baz_import import import_version, UserError
 
21
from progress import rewriting_supported
 
22
import pybaz
20
23
import sys
21
 
from errors import NoPyBaz
22
 
try:
23
 
    from baz_import import import_version, UserError
24
 
except NoPyBaz:
25
 
    print >> sys.stderr, "This command requires PyBaz.  Please ensure that it is installed."
26
 
    sys.exit(1)
27
 
 
28
 
import pybaz
29
24
import os.path
30
25
 
31
26
def main(args):
72
67
        else:
73
68
            return 0
74
69
    if len(args) == 2:
75
 
        version,output_dir = args
 
70
        version,output_dir = args[1]
76
71
            
77
72
    elif len(args) == 1:
78
73
        output_dir = args[0]
90
85
            return 1
91
86
        
92
87
    try:
 
88
        fancy = rewriting_supported()
93
89
        import_version(output_dir, version,
94
90
            verbose=opts.verbose, fast=opts.fast,
95
91
            dry_run=opts.dry_run, max_count=opts.max_count,
96
 
            skip_symlinks=opts.skip_symlinks)
 
92
            skip_symlinks=opts.skip_symlinks, fancy=fancy)
97
93
        return 0
98
94
    except UserError, e:
99
95
        print e