~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2005-09-13 06:12:01 UTC
  • Revision ID: mbp@sourcefrog.net-20050913061201-fc08c18f5eeca28a
- add fetch command as builtin

Show diffs side-by-side

added added

removed removed

Lines of Context:
1284
1284
        shellcomplete.shellcomplete(context)
1285
1285
 
1286
1286
 
 
1287
class cmd_fetch(Command):
 
1288
    """Copy in history from another branch but don't merge it.
 
1289
 
 
1290
    This is an internal method used for pull and merge."""
 
1291
    hidden = True
 
1292
    takes_args = ['from_branch', 'to_branch']
 
1293
    def run(self, from_branch, to_branch):
 
1294
        from bzrlib.fetch import Fetcher
 
1295
        from bzrlib.branch import Branch
 
1296
        from_b = Branch(from_branch)
 
1297
        to_b = Branch(to_branch)
 
1298
        Fetcher(to_b, from_b)
 
1299
        
 
1300
 
 
1301
 
1287
1302
class cmd_missing(Command):
1288
1303
    """What is missing in this branch relative to other branch.
1289
1304
    """
 
1305
    # TODO: rewrite this in terms of ancestry so that it shows only
 
1306
    # unmerged things
 
1307
    
1290
1308
    takes_args = ['remote?']
1291
1309
    aliases = ['mis', 'miss']
1292
1310
    # We don't have to add quiet to the list, because