~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shelf.py

  • Committer: Michael Ellerman
  • Date: 2006-03-11 12:53:48 UTC
  • mto: (325.1.2 bzrtools) (0.3.1 shelf-dev)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20060311125348-7a2b246f343db243
Add a test to make sure we don't delete the shelved patch if unshelving
fails. And make the error a little nicer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
            message = ""
152
152
        self.log('Reapplying shelved patches "%s"\n' % message)
153
153
 
154
 
        self._run_patch(to_unshelve)
 
154
        try:
 
155
            self._run_patch(to_unshelve)
 
156
        except CommandError:
 
157
            raise CommandError("Your shelved patch no " \
 
158
                    "longer applies cleanly to the working tree!")
155
159
 
156
160
        if len(to_remain) == 0:
157
161
            os.remove(patch_name)