~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-06-06 01:05:18 UTC
  • mfrom: (2507 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2510.
  • Revision ID: aaron.bentley@utoronto.ca-20070606010518-kmhq36e8pomuzio7
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
 
250
250
    To re-create the working tree, use "bzr checkout".
251
251
    """
252
 
    _see_also = ['checkout']
 
252
    _see_also = ['checkout', 'working-trees']
253
253
 
254
254
    takes_args = ['location?']
255
255
 
669
669
    location can be accessed.
670
670
    """
671
671
 
672
 
    _see_also = ['pull', 'update']
 
672
    _see_also = ['pull', 'update', 'working-trees']
673
673
    takes_options = ['remember', 'overwrite', 'verbose',
674
674
        Option('create-prefix',
675
675
               help='Create the path leading up to the branch '
812
812
                try:
813
813
                    tree_to = dir_to.open_workingtree()
814
814
                except errors.NotLocalUrl:
815
 
                    warning('This transport does not update the working '
816
 
                            'tree of: %s' % (br_to.base,))
 
815
                    warning("This transport does not update the working " 
 
816
                            "tree of: %s. See 'bzr help working-trees' for "
 
817
                            "more information." % br_to.base)
817
818
                    push_result = br_from.push(br_to, overwrite)
818
819
                except errors.NoWorkingTree:
819
820
                    push_result = br_from.push(br_to, overwrite)
1017
1018
    'bzr revert' instead of 'bzr commit' after the update.
1018
1019
    """
1019
1020
 
1020
 
    _see_also = ['pull']
 
1021
    _see_also = ['pull', 'working-trees']
1021
1022
    takes_args = ['dir?']
1022
1023
    aliases = ['up']
1023
1024
 
1061
1062
 
1062
1063
    Branches and working trees will also report any missing revisions.
1063
1064
    """
1064
 
    _see_also = ['revno']
 
1065
    _see_also = ['revno', 'working-trees', 'repositories']
1065
1066
    takes_args = ['location?']
1066
1067
    takes_options = ['verbose']
1067
1068
 
1312
1313
class cmd_init_repository(Command):
1313
1314
    """Create a shared repository to hold branches.
1314
1315
 
1315
 
    New branches created under the repository directory will store their revisions
1316
 
    in the repository, not in the branch directory.
 
1316
    New branches created under the repository directory will store their
 
1317
    revisions in the repository, not in the branch directory.
 
1318
 
 
1319
    If the --no-trees option is used then the branches in the repository
 
1320
    will not have working trees by default.
1317
1321
 
1318
1322
    example:
1319
1323
        bzr init-repo --no-trees repo
1321
1325
        bzr checkout --lightweight repo/trunk trunk-checkout
1322
1326
        cd trunk-checkout
1323
1327
        (add files here)
 
1328
 
 
1329
    See 'bzr help repositories' for more information.
1324
1330
    """
1325
1331
 
1326
1332
    _see_also = ['init', 'branch', 'checkout']
1557
1563
        self.outf.write(tree.basedir + '\n')
1558
1564
 
1559
1565
 
 
1566
def _parse_limit(limitstring):
 
1567
    try:
 
1568
        return int(limitstring)
 
1569
    except ValueError:
 
1570
        msg = "The limit argument must be an integer."
 
1571
        raise errors.BzrCommandError(msg)
 
1572
 
 
1573
 
1560
1574
class cmd_log(Command):
1561
1575
    """Show log of a branch, file, or directory.
1562
1576
 
1587
1601
                            short_name='m',
1588
1602
                            help='show revisions whose message matches this regexp',
1589
1603
                            type=str),
 
1604
                     Option('limit', 
 
1605
                            help='limit the output to the first N revisions',
 
1606
                            type=_parse_limit),
1590
1607
                     ]
1591
1608
    encoding_type = 'replace'
1592
1609
 
1597
1614
            forward=False,
1598
1615
            revision=None,
1599
1616
            log_format=None,
1600
 
            message=None):
 
1617
            message=None,
 
1618
            limit=None):
1601
1619
        from bzrlib.log import show_log
1602
1620
        assert message is None or isinstance(message, basestring), \
1603
1621
            "invalid message argument %r" % message
1678
1696
                     direction=direction,
1679
1697
                     start_revision=rev1,
1680
1698
                     end_revision=rev2,
1681
 
                     search=message)
 
1699
                     search=message,
 
1700
                     limit=limit)
1682
1701
        finally:
1683
1702
            b.unlock()
1684
1703