/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/commands.py

Merge up bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
 
96
96
 
97
97
def _unsquish_command_name(cmd):
98
 
    assert cmd.startswith("cmd_")
99
98
    return cmd[4:].replace('_','-')
100
99
 
101
100
 
283
282
            elif aname[-1] == '*':
284
283
                aname = '[' + aname[:-1] + '...]'
285
284
            s += aname + ' '
286
 
                
287
 
        assert s[-1] == ' '
288
 
        s = s[:-1]
 
285
        s = s[:-1]      # remove last space
289
286
        return s
290
287
 
291
288
    def get_help_text(self, additional_see_also=None, plain=True,
401
398
            if line.startswith(':') and line.endswith(':') and len(line) > 2:
402
399
                save_section(sections, label, section)
403
400
                label,section = line[1:-1],''
404
 
            elif label != None and len(line) > 1 and not line[0].isspace():
 
401
            elif (label is not None) and len(line) > 1 and not line[0].isspace():
405
402
                save_section(sections, label, section)
406
403
                label,section = None,line
407
404
            else:
445
442
 
446
443
    def _setup_outf(self):
447
444
        """Return a file linked to stdout, which has proper encoding."""
448
 
        assert self.encoding_type in ['strict', 'exact', 'replace']
449
 
 
450
445
        # Originally I was using self.stdout, but that looks
451
446
        # *way* too much like sys.stdout
452
447
        if self.encoding_type == 'exact':