/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 from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
235
235
            revs.extend(revision)
236
236
        if revision_info_list is not None:
237
237
            for rev in revision_info_list:
238
 
                revs.append(RevisionSpec(rev))
 
238
                revs.append(RevisionSpec.from_string(rev))
239
239
        if len(revs) == 0:
240
240
            raise BzrCommandError('You must supply a revision identifier')
241
241
 
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)
2248
2248
        tree, file_list = tree_files(file_list)
2249
2249
        tree.lock_write()
2250
2250
        try:
2251
 
            pending_merges = tree.pending_merges() 
2252
 
            if len(pending_merges) != 1:
 
2251
            parents = tree.get_parent_ids()
 
2252
            if len(parents) != 2:
2253
2253
                raise BzrCommandError("Sorry, remerge only works after normal"
2254
2254
                                      " merges.  Not cherrypicking or"
2255
2255
                                      " multi-merges.")
2256
2256
            repository = tree.branch.repository
2257
 
            base_revision = common_ancestor(tree.branch.last_revision(), 
2258
 
                                            pending_merges[0], repository)
 
2257
            base_revision = common_ancestor(parents[0],
 
2258
                                            parents[1], repository)
2259
2259
            base_tree = repository.revision_tree(base_revision)
2260
 
            other_tree = repository.revision_tree(pending_merges[0])
 
2260
            other_tree = repository.revision_tree(parents[1])
2261
2261
            interesting_ids = None
2262
2262
            new_conflicts = []
2263
2263
            conflicts = tree.conflicts()
2287
2287
                    pass
2288
2288
            conflicts = merge_inner(tree.branch, other_tree, base_tree,
2289
2289
                                    this_tree=tree,
2290
 
                                    interesting_ids=interesting_ids, 
2291
 
                                    other_rev_id=pending_merges[0], 
2292
 
                                    merge_type=merge_type, 
 
2290
                                    interesting_ids=interesting_ids,
 
2291
                                    other_rev_id=parents[1],
 
2292
                                    merge_type=merge_type,
2293
2293
                                    show_base=show_base,
2294
2294
                                    reprocess=reprocess)
2295
2295
        finally:
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 hasattr(plugin, '__path__'):
 
2482
            if getattr(plugin, '__path__', None) is not None:
2483
2483
                print plugin.__path__[0]
2484
 
            elif hasattr(plugin, '__file__'):
 
2484
            elif getattr(plugin, '__file__', None) is not None:
2485
2485
                print plugin.__file__
2486
2486
            else:
2487
 
                print `plugin`
 
2487
                print repr(plugin)
2488
2488
                
2489
2489
            d = getdoc(plugin)
2490
2490
            if d: