~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Francis Devereux
  • Date: 2011-11-21 19:27:55 UTC
  • mto: (6337.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6330.
  • Revision ID: francis@devrx.org-20111121192755-p1s5rb42q4gcgyfh
Pass specific_files to status hooks

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
        try:
158
158
            for hook in hooks['pre_status']:
159
159
                hook(StatusHookParams(old, new, to_file, versioned,
160
 
                    show_ids, short, verbose))
 
160
                    show_ids, short, verbose, specific_files=specific_files))
161
161
 
162
162
            specific_files, nonexistents \
163
163
                = _filter_nonexistent(specific_files, old, new)
222
222
                raise errors.PathsDoNotExist(nonexistents)
223
223
            for hook in hooks['post_status']:
224
224
                hook(StatusHookParams(old, new, to_file, versioned,
225
 
                    show_ids, short, verbose))
 
225
                    show_ids, short, verbose, specific_files=specific_files))
226
226
        finally:
227
227
            old.unlock()
228
228
            new.unlock()
416
416
    """
417
417
 
418
418
    def __init__(self, old_tree, new_tree, to_file, versioned, show_ids,
419
 
            short, verbose):
 
419
            short, verbose, specific_files=None):
420
420
        """Create a group of post_status hook parameters.
421
421
 
422
422
        :param old_tree: Start tree (basis tree) for comparison.
426
426
        :param show_ids: Show internal object ids.
427
427
        :param short: Use short status indicators.
428
428
        :param verbose: Verbose flag.
 
429
        :param specific_files: If set, a list of filenames whose status should be
 
430
            shown.  It is an error to give a filename that is not in the working
 
431
            tree, or in the working inventory or in the basis inventory.
429
432
        """
430
433
        self.old_tree = old_tree
431
434
        self.new_tree = new_tree
434
437
        self.show_ids = show_ids
435
438
        self.short = short
436
439
        self.verbose = verbose
 
440
        self.specific_files = specific_files
437
441
 
438
442
    def __eq__(self, other):
439
443
        return self.__dict__ == other.__dict__
440
444
 
441
445
    def __repr__(self):
442
 
        return "<%s(%s, %s, %s, %s, %s, %s, %s)>" % (self.__class__.__name__,
 
446
        return "<%s(%s, %s, %s, %s, %s, %s, %s, %s)>" % (self.__class__.__name__,
443
447
            self.old_tree, self.new_tree, self.to_file, self.versioned,
444
 
            self.show_ids, self.short, self.verbose)
 
448
            self.show_ids, self.short, self.verbose, self.specific_files)
445
449
 
446
450
 
447
451
def _show_shelve_summary(params):