~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

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
383
385
            file_list = [u'.']
384
386
        # mutter("smart add of %r")
385
387
        inv = self.inventory
387
389
        ignored = {}
388
390
        dirs_to_add = []
389
391
        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())
390
400
 
391
401
        # validate user file paths and convert all paths to tree
392
402
        # relative : it's cheaper to make a tree relative path an abspath
453
463
            if illegalpath_re.search(directory.raw_path):
454
464
                trace.warning("skipping %r (contains \\n or \\r)" % abspath)
455
465
                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
456
473
 
457
474
            if parent_ie is not None:
458
475
                versioned = directory.base_path in parent_ie.children