~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-08 12:06:24 UTC
  • mfrom: (5015.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100208120624-zqc1nk5x9hltgmiu
(vila)(trivial) Simplify some tests in
        per_workingtree/test_smart_add.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
380
380
 
381
381
        if not file_list:
382
382
            # no paths supplied: add the entire tree.
383
 
            # FIXME: this assumes we are running in a working tree subdir :-/
384
 
            # -- vila 20100208
385
383
            file_list = [u'.']
386
384
        # mutter("smart add of %r")
387
385
        inv = self.inventory
389
387
        ignored = {}
390
388
        dirs_to_add = []
391
389
        user_dirs = set()
392
 
        conflicts_related = set()
393
 
        # Not all mutable trees can have conflicts
394
 
        if getattr(self, 'conflicts', None) is not None:
395
 
            # Collect all related files without checking whether they exist or
396
 
            # are versioned. It's cheaper to do that once for all conflicts
397
 
            # than trying to find the relevant conflict for each added file.
398
 
            for c in self.conflicts():
399
 
                conflicts_related.update(c.associated_filenames())
400
390
 
401
391
        # validate user file paths and convert all paths to tree
402
392
        # relative : it's cheaper to make a tree relative path an abspath
463
453
            if illegalpath_re.search(directory.raw_path):
464
454
                trace.warning("skipping %r (contains \\n or \\r)" % abspath)
465
455
                continue
466
 
            if directory.raw_path in conflicts_related:
467
 
                # If the file looks like one generated for a conflict, don't
468
 
                # add it.
469
 
                trace.warning(
470
 
                    'skipping %s (generated to help resolve conflicts)',
471
 
                    abspath)
472
 
                continue
473
456
 
474
457
            if parent_ie is not None:
475
458
                versioned = directory.base_path in parent_ie.children