~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzr-pull

  • Committer: abentley
  • Date: 2005-05-02 07:04:00 UTC
  • Revision ID: abentley@lappy-20050502070400-d14eee47272c8cdf
added bzr-push command

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
18
19
from bzrlib import Branch
 
20
from bzrlib.diff import diff_trees
19
21
import sys
20
22
import os
21
 
import bzrtools
22
 
import optparse
 
23
import scriptlib
 
24
bzrlib.trace.create_tracefile([])
23
25
 
24
26
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]
 
27
if len(sys.argv) > 1:
 
28
    location = sys.argv[1]
32
29
else:
33
30
    location = None
34
 
bzrtools.pull(cur_branch, location, options.overwrite)
 
31
scriptlib.pull(cur_branch, location)
35
32