~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-06-14 17:06:32 UTC
  • mto: This revision was merged to the branch mainline in revision 395.
  • Revision ID: abentley@panoramicfeedback.com-20060614170632-935a8dcb79efc4b7
Implement 'shove' for moving changes to other trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
382
382
        from upstream_import import do_import
383
383
        do_import(source, tree)
384
384
 
 
385
class cmd_shove(bzrlib.commands.Command):
 
386
    """Apply uncommitted changes to another tree <BZRTOOLS>
 
387
    
 
388
    This is useful when you start to make changes in one tree, then realize
 
389
    they should really be done in a different tree.
 
390
 
 
391
    Shove is implemented using merge, so:
 
392
     - All changes, including renames and adds, will be applied.
 
393
     - No changes that have already been applied will be applied.
 
394
     - If the target is significantly different from the source, conflicts may
 
395
       be produced.
 
396
    """
 
397
 
 
398
    takes_args = ['target', 'source?']
 
399
    def run(self, target, source='.'):
 
400
        from shove import do_shove
 
401
        do_shove(source, target)
 
402
 
385
403
 
386
404
commands = [cmd_shelve, cmd_unshelve, cmd_shelf, cmd_clean_tree,
387
405
            cmd_graph_ancestry, cmd_fetch_ghosts, cmd_patch, cmd_shell,
388
406
            cmd_branch_history, cmd_zap, cmd_cbranch, cmd_branches, 
389
 
            cmd_multi_pull, cmd_switch, cmd_branch_mark, cmd_import]
 
407
            cmd_multi_pull, cmd_switch, cmd_branch_mark, cmd_import, cmd_shove]
390
408
 
391
409
 
392
410
import bzrlib.builtins