~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shelf.py

  • Committer: Michael Ellerman
  • Date: 2006-05-30 17:20:21 UTC
  • mto: (0.3.1 shelf-dev)
  • mto: This revision was merged to the branch mainline in revision 393.
  • Revision ID: michael@ellerman.id.au-20060530172021-42c65cc2ffa9cfd2
Make the patch argument to 'shelf show' optional.

If no patch is specified the topmost (ie. most recent) patch is shown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        path = self.__path_from_user(patch)
59
59
        os.rename(path, '%s~' % path)
60
60
 
61
 
    def display(self, patch):
62
 
        path = self.__path_from_user(patch)
 
61
    def display(self, patch=None):
 
62
        if patch is None:
 
63
            path = self.last_patch()
 
64
        else:
 
65
            path = self.__path_from_user(patch)
63
66
        sys.stdout.write(open(path).read())
64
67
 
65
68
    def list(self):