~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to push.py

merge from aaron

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
16
from bzrlib.branch import Branch
17
 
from bzrlib.commands import Command, OPTIONS
 
17
from bzrlib.commands import Command
 
18
from bzrlib.option import Option
18
19
import sys
19
20
import os
20
21
import bzrtools 
21
22
 
22
 
OPTIONS['overwrite'] = None
 
23
Option.OPTIONS['overwrite'] = Option('overwrite', help='Unconditionally'
 
24
                                     ' overwrite existing data.')
23
25
 
24
26
class cmd_push(Command):
25
27
    """Upload this branch to another location using rsync.
26
28
 
27
29
    If no location is specified, the last-used location will be used.  To
28
30
    to prevent dirty trees from being uploaded, push will error out if there
29
 
    are unknown files or local changes.
 
31
    are unknown files or local changes.  It will also error out if the
 
32
    upstream directory is non-empty and not an earlier version of the
 
33
    branch.
30
34
    """
31
35
    takes_args = ['location?']
32
36
    takes_options = ['overwrite']