/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: Robert Collins
  • Date: 2007-06-04 00:51:54 UTC
  • mfrom: (2504 +trunk)
  • mto: (2507.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2505.
  • Revision ID: robertc@robertcollins.net-20070604005154-yvx2q8jnwiprw6du
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
 
2965
2984
    def run(self, other_branch=None, reverse=False, mine_only=False,
2966
2985
            theirs_only=False, log_format=None, long=False, short=False, line=False, 
2967
2986
            show_ids=False, verbose=False):
2968
 
        from bzrlib.missing import find_unmerged, iter_log_data
 
2987
        from bzrlib.missing import find_unmerged, iter_log_revisions
2969
2988
        from bzrlib.log import log_formatter
2970
2989
        local_branch = Branch.open_containing(u".")[0]
2971
2990
        parent = local_branch.get_parent()
2996
3015
                    remote_extra.reverse()
2997
3016
                if local_extra and not theirs_only:
2998
3017
                    print "You have %d extra revision(s):" % len(local_extra)
2999
 
                    for data in iter_log_data(local_extra, local_branch.repository,
3000
 
                                              verbose):
3001
 
                        lf.show(*data)
 
3018
                    for revision in iter_log_revisions(local_extra, 
 
3019
                                        local_branch.repository,
 
3020
                                        verbose):
 
3021
                        lf.log_revision(revision)
3002
3022
                    printed_local = True
3003
3023
                else:
3004
3024
                    printed_local = False
3006
3026
                    if printed_local is True:
3007
3027
                        print "\n\n"
3008
3028
                    print "You are missing %d revision(s):" % len(remote_extra)
3009
 
                    for data in iter_log_data(remote_extra, remote_branch.repository, 
3010
 
                                              verbose):
3011
 
                        lf.show(*data)
 
3029
                    for revision in iter_log_revisions(remote_extra, 
 
3030
                                        remote_branch.repository, 
 
3031
                                        verbose):
 
3032
                        lf.log_revision(revision)
3012
3033
                if not remote_extra and not local_extra:
3013
3034
                    status_code = 0
3014
3035
                    print "Branches are up to date."