~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to command_classes.py

  • Committer: Aaron Bentley
  • Date: 2011-02-01 23:25:27 UTC
  • mfrom: (749.1.1 2.3)
  • Revision ID: aaron@aaronbentley.com-20110201232527-8yjkmelpj1udx4w7
Merged 2.3 into bzrtools.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
class cmd_graph_ancestry(BzrToolsCommand):
50
50
    """Produce ancestry graphs using dot.
51
 
    
 
51
 
52
52
    Output format is detected according to file extension.  Some of the more
53
53
    common output formats are html, png, gif, svg, ps.  An extension of '.dot'
54
54
    will cause a dot graph file to be produced.  HTML output has mouseovers
342
342
    --all        --help       --revision   --show-ids
343
343
    bzr bzrtools:287/> status --
344
344
    """
345
 
    def run(self):
 
345
    takes_options = [
 
346
        Option('directory',
 
347
            help='Branch in which to start the shell, '
 
348
                 'rather than the one containing the working directory.',
 
349
            short_name='d',
 
350
            type=unicode,
 
351
            ),
 
352
        ]
 
353
    def run(self, directory=None):
346
354
        import shell
347
 
        return shell.run_shell()
 
355
        return shell.run_shell(directory)
348
356
 
349
357
 
350
358
class cmd_branch_history(BzrToolsCommand):
523
531
    """Compare a conflicted file against BASE."""
524
532
 
525
533
    encoding_type = 'exact'
526
 
    takes_args = ['file']
 
534
    takes_args = ['file*']
527
535
    takes_options = [
528
536
        RegistryOption.from_kwargs('direction', 'Direction of comparison.',
529
537
            value_switches=True, enum_switch=False,
530
538
            other='Compare OTHER against common base.',
531
539
            this='Compare THIS against common base.')]
532
540
 
533
 
    def run(self, file, direction='other'):
 
541
    def run(self, file_list, direction='other'):
534
542
        from bzrlib.plugins.bzrtools.colordiff import DiffWriter
535
 
        from conflict_diff import conflict_diff
 
543
        from conflict_diff import ConflictDiffer
536
544
        dw = DiffWriter(self.outf, check_style=False, color='auto')
537
 
        conflict_diff(dw, file, direction)
 
545
        ConflictDiffer().run(dw, file_list, direction)
538
546
 
539
547
 
540
548
class cmd_rspush(BzrToolsCommand):