16
by abentley
Got is_clean under test, added setters/getters for pull data |
1 |
#!/usr/bin/env python
|
2 |
||
15
by abentley
started on pull script |
3 |
# Copyright (C) 2005 by Aaron Bentley
|
4 |
||
5 |
# This program is free software; you can redistribute it and/or modify
|
|
6 |
# it under the terms of the GNU General Public License as published by
|
|
7 |
# the Free Software Foundation; either version 2 of the License, or
|
|
8 |
# (at your option) any later version.
|
|
9 |
||
10 |
# This program is distributed in the hope that it will be useful,
|
|
11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
# GNU General Public License for more details.
|
|
14 |
||
15 |
# You should have received a copy of the GNU General Public License
|
|
16 |
# along with this program; if not, write to the Free Software
|
|
17 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
18 |
from bzrlib import Branch |
|
19 |
import sys |
|
18
by abentley
Finished implementing bzr-pull |
20 |
import os |
74
by Aaron Bentley
renamed scriptlib.py to bzrtools.py |
21 |
import bzrtools |
48
by Aaron Bentley
Added overwrite parameter to bzr-pull |
22 |
import optparse |
15
by abentley
started on pull script |
23 |
|
24 |
cur_branch = Branch(".") |
|
48
by Aaron Bentley
Added overwrite parameter to bzr-pull |
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] |
|
19
by abentley
librified most of the pull script |
32 |
else: |
33 |
location = None |
|
74
by Aaron Bentley
renamed scriptlib.py to bzrtools.py |
34 |
bzrtools.pull(cur_branch, location, options.overwrite) |
19
by abentley
librified most of the pull script |
35 |