~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2012-07-19 15:44:55 UTC
  • mto: This revision was merged to the branch mainline in revision 6540.
  • Revision ID: aaron@aaronbentley.com-20120719154455-j7y8fm7o9y95vo38
Eliminate get_stored_uncommitted from API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
        """
253
253
        raise NotImplementedError(self._get_config)
254
254
 
255
 
    def has_stored_uncommitted(self):
256
 
        """If true, the branch has stored, uncommitted changes in it."""
257
 
        raise NotImplementedError(self.has_stored_uncommitted)
258
 
 
259
255
    def store_uncommitted(self, creator, message=None):
260
256
        """Store uncommitted changes from a ShelfCreator.
261
257
 
2443
2439
        else:
2444
2440
            return self
2445
2441
 
2446
 
    def has_stored_uncommitted(self):
2447
 
        """If true, the branch has stored, uncommitted changes in it."""
2448
 
        return self._uncommitted_branch()._get_uncommitted() is not None
2449
 
 
2450
2442
    def store_uncommitted(self, creator, message=None):
2451
2443
        """Store uncommitted changes from a ShelfCreator.
2452
2444
 
2459
2451
        if creator is None:
2460
2452
            branch._put_uncommitted(None)
2461
2453
            return
2462
 
        if branch.has_stored_uncommitted():
 
2454
        if branch._get_uncommitted() is not None:
2463
2455
            raise errors.ChangesAlreadyStored
2464
2456
        transform = StringIO()
2465
2457
        creator.write_shelf(transform, message)