/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2009-09-02 13:32:52 UTC
  • mfrom: (4634.6.14 2.0)
  • mto: (4634.6.15 2.0)
  • mto: This revision was merged to the branch mainline in revision 4667.
  • Revision ID: john@arbash-meinel.com-20090902133252-t2t94xtckoliv2th
Merge lp:bzr/2.0 to resolve NEWS issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
 
121
121
 
122
122
def _get_one_revision_tree(command_name, revisions, branch=None, tree=None):
 
123
    """Get a revision tree. Not suitable for commands that change the tree.
 
124
    
 
125
    Specifically, the basis tree in dirstate trees is coupled to the dirstate
 
126
    and doing a commit/uncommit/pull will at best fail due to changing the
 
127
    basis revision data.
 
128
 
 
129
    If tree is passed in, it should be already locked, for lifetime management
 
130
    of the trees internal cached state.
 
131
    """
123
132
    if branch is None:
124
133
        branch = tree.branch
125
134
    if revisions is None:
3029
3038
                raise errors.BzrCommandError("empty commit message specified")
3030
3039
            return my_message
3031
3040
 
 
3041
        # The API permits a commit with a filter of [] to mean 'select nothing'
 
3042
        # but the command line should not do that.
 
3043
        if not selected_list:
 
3044
            selected_list = None
3032
3045
        try:
3033
3046
            tree.commit(message_callback=get_message,
3034
3047
                        specific_files=selected_list,
5631
5644
        if writer is None:
5632
5645
            writer = bzrlib.option.diff_writer_registry.get()
5633
5646
        try:
5634
 
            Shelver.from_args(writer(sys.stdout), revision, all, file_list,
5635
 
                              message, destroy=destroy).run()
 
5647
            shelver = Shelver.from_args(writer(sys.stdout), revision, all,
 
5648
                file_list, message, destroy=destroy)
 
5649
            try:
 
5650
                shelver.run()
 
5651
            finally:
 
5652
                shelver.work_tree.unlock()
5636
5653
        except errors.UserAbort:
5637
5654
            return 0
5638
5655
 
5677
5694
 
5678
5695
    def run(self, shelf_id=None, action='apply'):
5679
5696
        from bzrlib.shelf_ui import Unshelver
5680
 
        Unshelver.from_args(shelf_id, action).run()
 
5697
        unshelver = Unshelver.from_args(shelf_id, action)
 
5698
        try:
 
5699
            unshelver.run()
 
5700
        finally:
 
5701
            unshelver.tree.unlock()
5681
5702
 
5682
5703
 
5683
5704
class cmd_clean_tree(Command):