~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to scriptlib.py

  • Committer: Aaron Bentley
  • Date: 2005-05-26 13:29:54 UTC
  • Revision ID: abentley@troll-20050526132954-76953c12b0da8d04
Added overwrite parameter to bzr-pull

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
exclusions = ('x-push-data', 'x-pull-data')
124
124
 
125
125
 
126
 
def pull(cur_branch, location=None):
 
126
def pull(cur_branch, location=None, overwrite=False):
127
127
    pull_location, pull_revision = get_pull_data(cur_branch)
128
128
    if pull_location is not None:
129
 
        if cur_branch.last_patch() != pull_revision:
 
129
        if not overwrite and cur_branch.last_patch() != pull_revision:
130
130
            print "Aborting: This branch has had commits, so pull would lose data."
131
131
            sys.exit(1)
132
132
    if location is not None: