~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzr-pull

  • Committer: Aaron Bentley
  • Date: 2005-05-26 14:20:29 UTC
  • Revision ID: abentley@troll-20050526142029-e919772712205486
Added bug report

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
import bzrlib
19
18
from bzrlib import Branch
20
 
from bzrlib.diff import diff_trees
21
19
import sys
22
20
import os
23
21
import scriptlib
24
 
bzrlib.trace.create_tracefile([])
 
22
import optparse
25
23
 
26
24
cur_branch = Branch(".")
27
 
if len(sys.argv) > 1:
28
 
    location = sys.argv[1]
 
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]
29
32
else:
30
33
    location = None
31
 
scriptlib.pull(cur_branch, location)
 
34
scriptlib.pull(cur_branch, location, options.overwrite)
32
35