~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robey Pointer
  • Date: 2006-09-08 18:46:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1996.
  • Revision ID: robey@lag.net-20060908184629-e3fc4c61ca21508c
pychecker is on crack; go back to using 'is None'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
911
911
    def run(self, filename):
912
912
        tree, relpath = WorkingTree.open_containing(filename)
913
913
        i = tree.inventory.path2id(relpath)
914
 
        if i == None:
 
914
        if i is None:
915
915
            raise BzrError("%r is not a versioned file" % filename)
916
916
        else:
917
917
            self.outf.write(i + '\n')
932
932
        tree, relpath = WorkingTree.open_containing(filename)
933
933
        inv = tree.inventory
934
934
        fid = inv.path2id(relpath)
935
 
        if fid == None:
 
935
        if fid is None:
936
936
            raise BzrError("%r is not a versioned file" % filename)
937
937
        for fip in inv.get_idpath(fid):
938
938
            self.outf.write(fip + '\n')
996
996
            last_revision = wt.last_revision()
997
997
 
998
998
        revision_ids = b.repository.get_ancestry(last_revision)
999
 
        assert revision_ids[0] == None
 
999
        assert revision_ids[0] is None
1000
1000
        revision_ids.pop(0)
1001
1001
        for revision_id in revision_ids:
1002
1002
            self.outf.write(revision_id + '\n')
1375
1375
        if rev1 > rev2:
1376
1376
            (rev2, rev1) = (rev1, rev2)
1377
1377
 
1378
 
        if (log_format == None):
 
1378
        if (log_format is None):
1379
1379
            default = b.get_config().log_format()
1380
1380
            log_format = get_log_format(long=long, short=short, line=line, 
1381
1381
                                        default=default)
2425
2425
            remote_branch.lock_read()
2426
2426
            try:
2427
2427
                local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
2428
 
                if (log_format == None):
 
2428
                if (log_format is None):
2429
2429
                    default = local_branch.get_config().log_format()
2430
2430
                    log_format = get_log_format(long=long, short=short, 
2431
2431
                                                line=line, default=default)
2479
2479
        import bzrlib.plugin
2480
2480
        from inspect import getdoc
2481
2481
        for name, plugin in bzrlib.plugin.all_plugins().items():
2482
 
            if getattr(plugin, '__path__', None) != None:
 
2482
            if getattr(plugin, '__path__', None) is not None:
2483
2483
                print plugin.__path__[0]
2484
 
            elif getattr(plugin, '__file__', None) != None:
 
2484
            elif getattr(plugin, '__file__', None) is not None:
2485
2485
                print plugin.__file__
2486
2486
            else:
2487
2487
                print repr(plugin)