~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to push.py

  • Committer: Aaron Bentley
  • Date: 2005-09-23 18:00:51 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050923180051-420a90cf5e6cbd5a
Updated doctests

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
 
from bzrlib import Branch
17
 
from bzrlib.commands import Command
 
16
from bzrlib.branch import Branch
 
17
from bzrlib.commands import Command, OPTIONS
18
18
import sys
19
19
import os
20
20
import bzrtools 
21
21
 
 
22
OPTIONS['overwrite'] = None
 
23
 
22
24
class cmd_push(Command):
23
25
    """Upload this branch to another location using rsync.
24
26
 
27
29
    are unknown files or local changes.
28
30
    """
29
31
    takes_args = ['location?']
 
32
    takes_options = ['overwrite']
30
33
 
31
 
    def run(self, location=None):
32
 
        cur_branch = Branch(".")
33
 
        bzrtools.push(cur_branch, location)
 
34
    def run(self, location=None, overwrite=False):
 
35
        cur_branch = Branch.open_containing(".")
 
36
        bzrtools.push(cur_branch, location, overwrite=overwrite)