/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

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
        format = bzrdir.BzrDirMetaFormat1()
108
108
        format.repository_format = repository.RepositoryFormatKnit1()
109
109
        return format
 
110
    if typestring == "experimental-knit2":
 
111
        format = bzrdir.BzrDirMetaFormat1()
 
112
        format.repository_format = repository.RepositoryFormatKnit2()
 
113
        return format
110
114
    msg = "Unknown bzr format %s. Current formats are: default, knit,\n" \
111
115
          "metaweave and weave" % typestring
112
116
    raise BzrCommandError(msg)
911
915
    def run(self, filename):
912
916
        tree, relpath = WorkingTree.open_containing(filename)
913
917
        i = tree.inventory.path2id(relpath)
914
 
        if i == None:
 
918
        if i is None:
915
919
            raise BzrError("%r is not a versioned file" % filename)
916
920
        else:
917
921
            self.outf.write(i + '\n')
932
936
        tree, relpath = WorkingTree.open_containing(filename)
933
937
        inv = tree.inventory
934
938
        fid = inv.path2id(relpath)
935
 
        if fid == None:
 
939
        if fid is None:
936
940
            raise BzrError("%r is not a versioned file" % filename)
937
941
        for fip in inv.get_idpath(fid):
938
942
            self.outf.write(fip + '\n')
996
1000
            last_revision = wt.last_revision()
997
1001
 
998
1002
        revision_ids = b.repository.get_ancestry(last_revision)
999
 
        assert revision_ids[0] == None
 
1003
        assert revision_ids[0] is None
1000
1004
        revision_ids.pop(0)
1001
1005
        for revision_id in revision_ids:
1002
1006
            self.outf.write(revision_id + '\n')
1386
1390
        if rev1 > rev2:
1387
1391
            (rev2, rev1) = (rev1, rev2)
1388
1392
 
1389
 
        if (log_format == None):
 
1393
        if (log_format is None):
1390
1394
            default = b.get_config().log_format()
1391
1395
            log_format = get_log_format(long=long, short=short, line=line, 
1392
1396
                                        default=default)
2446
2450
            remote_branch.lock_read()
2447
2451
            try:
2448
2452
                local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
2449
 
                if (log_format == None):
 
2453
                if (log_format is None):
2450
2454
                    default = local_branch.get_config().log_format()
2451
2455
                    log_format = get_log_format(long=long, short=short, 
2452
2456
                                                line=line, default=default)
2500
2504
        import bzrlib.plugin
2501
2505
        from inspect import getdoc
2502
2506
        for name, plugin in bzrlib.plugin.all_plugins().items():
2503
 
            if hasattr(plugin, '__path__'):
 
2507
            if getattr(plugin, '__path__', None) is not None:
2504
2508
                print plugin.__path__[0]
2505
 
            elif hasattr(plugin, '__file__'):
 
2509
            elif getattr(plugin, '__file__', None) is not None:
2506
2510
                print plugin.__file__
2507
2511
            else:
2508
 
                print `plugin`
 
2512
                print repr(plugin)
2509
2513
                
2510
2514
            d = getdoc(plugin)
2511
2515
            if d: