~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/HACKING.txt

  • Committer: John Arbash Meinel
  • Date: 2009-10-12 17:03:40 UTC
  • mfrom: (4679.3.94 2.1-simple-set)
  • mto: This revision was merged to the branch mainline in revision 4736.
  • Revision ID: john@arbash-meinel.com-20091012170340-o21aj90jbtswo9m4
Bring in the latest 'simple-set' code.

This is just a prep step for refining and landing the StaticTuple code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
671
671
    may not catch every case but it's still useful sometimes.
672
672
 
673
673
 
 
674
Cleanup methods
 
675
===============
 
676
 
 
677
Often when something has failed later code, including cleanups invoked
 
678
from ``finally`` blocks, will fail too.  These secondary failures are
 
679
generally uninteresting compared to the original exception.  So use the
 
680
``only_raises`` decorator (from ``bzrlib.decorators``) for methods that
 
681
are typically called in ``finally`` blocks, such as ``unlock`` methods.
 
682
For example, ``@only_raises(LockNotHeld, LockBroken)``.  All errors that
 
683
are unlikely to be a knock-on failure from an previous failure should be
 
684
allowed.
 
685
 
 
686
 
674
687
Factories
675
688
=========
676
689