~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-20 01:17:49 UTC
  • mfrom: (1711.4.21 win32)
  • Revision ID: pqm@pqm.ubuntu.com-20060620011749-a14183c559028aaf
(jam) misc win32 fixes (#50155), fix bundle merging

Show diffs side-by-side

added added

removed removed

Lines of Context:
2441
2441
 
2442
2442
class cmd_testament(Command):
2443
2443
    """Show testament (signing-form) of a revision."""
2444
 
    takes_options = ['revision', 'long']
 
2444
    takes_options = ['revision', 'long', 
 
2445
                     Option('strict', help='Produce a strict testament')]
2445
2446
    takes_args = ['branch?']
2446
2447
    @display_command
2447
 
    def run(self, branch=u'.', revision=None, long=False):
2448
 
        from bzrlib.testament import Testament
 
2448
    def run(self, branch=u'.', revision=None, long=False, strict=False):
 
2449
        from bzrlib.testament import Testament, StrictTestament
 
2450
        if strict is True:
 
2451
            testament_class = StrictTestament
 
2452
        else:
 
2453
            testament_class = Testament
2449
2454
        b = WorkingTree.open_containing(branch)[0].branch
2450
2455
        b.lock_read()
2451
2456
        try:
2453
2458
                rev_id = b.last_revision()
2454
2459
            else:
2455
2460
                rev_id = revision[0].in_history(b).rev_id
2456
 
            t = Testament.from_revision(b.repository, rev_id)
 
2461
            t = testament_class.from_revision(b.repository, rev_id)
2457
2462
            if long:
2458
2463
                sys.stdout.writelines(t.as_text_lines())
2459
2464
            else: