~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2005-10-18 06:56:24 UTC
  • mfrom: (0.2.1)
  • mto: This revision was merged to the branch mainline in revision 1463.
  • Revision ID: robertc@robertcollins.net-20051018065624-e92ff4e7ab3175bb
'bzr pull' now accepts '--clobber'.

This will discard local changes and make this branch identical to the source
branch. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
331
331
    If branches have diverged, you can use 'bzr merge' to pull the text changes
332
332
    from one into the other.
333
333
    """
334
 
    takes_options = ['remember']
 
334
    takes_options = ['remember', 'clobber']
335
335
    takes_args = ['location?']
336
336
 
337
 
    def run(self, location=None, remember=False):
 
337
    def run(self, location=None, remember=False, clobber=False):
338
338
        from bzrlib.merge import merge
339
339
        import tempfile
340
340
        from shutil import rmtree
350
350
                location = stored_loc
351
351
        br_from = Branch.open(location)
352
352
        try:
353
 
            br_to.working_tree().pull(br_from, remember)
 
353
            br_to.working_tree().pull(br_from, remember, clobber)
354
354
        except DivergedBranches:
355
355
            raise BzrCommandError("These branches have diverged."
356
356
                                  "  Try merge.")