~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.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:
306
306
                yield stem
307
307
 
308
308
    @needs_write_lock
309
 
    def pull(self, source, remember=False):
 
309
    def pull(self, source, remember=False, clobber=False):
310
310
        from bzrlib.merge import merge
311
311
        source.lock_read()
312
312
        try:
315
315
            try:
316
316
                self.branch.update_revisions(source)
317
317
            except DivergedBranches:
318
 
                if True:
 
318
                if not clobber:
319
319
                    raise
 
320
                self.branch.set_revision_history(source.revision_history())
320
321
            new_revision_history = self.branch.revision_history()
321
322
            if new_revision_history != old_revision_history:
322
323
                merge((self.basedir, -1), (self.basedir, old_revno), check_clean=False)