~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzr-pull

  • Committer: Aaron Bentley
  • Date: 2005-05-13 21:01:44 UTC
  • Revision ID: abentley@troll-20050513210144-d5ed15cf2571c77e
Adapted to new ways of checking for clean tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
from bzrlib import Branch
19
19
import sys
20
20
import os
21
 
import bzrtools
22
 
import optparse
 
21
import scriptlib
23
22
 
24
23
cur_branch = Branch(".")
25
 
parser = optparse.OptionParser("bzr-pull [URL]")
26
 
parser.add_option("-o", "--overwrite", action="store_true", 
27
 
                                  dest="overwrite",
28
 
                                  help="Overwrite any local changes")
29
 
options, args = parser.parse_args(sys.argv[1:])
30
 
if len(args) > 0:
31
 
    location = args[0]
 
24
if len(sys.argv) > 1:
 
25
    location = sys.argv[1]
32
26
else:
33
27
    location = None
34
 
bzrtools.pull(cur_branch, location, options.overwrite)
 
28
scriptlib.pull(cur_branch, location)
35
29