~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Robert Collins
  • Date: 2005-09-14 09:01:06 UTC
  • mto: (1185.1.12)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050914090106-50ddfad9500a8ae9
make diff lsdiff/filterdiff friendly

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
 
import os.path
 
18
import os
19
19
import tempfile
20
20
import shutil
21
21
import errno
196
196
            return True
197
197
        return self.tree.inventory.has_id(file_id)
198
198
 
 
199
    def has_or_had_id(self, file_id):
 
200
        if file_id == self.tree.inventory.root.file_id:
 
201
            return True
 
202
        return self.tree.inventory.has_id(file_id)
 
203
 
199
204
    def readonly_path(self, id):
200
205
        if id not in self.tree:
201
206
            return None
299
304
        merge_inner(this_branch, other_tree, base_tree, tempdir, 
300
305
                    ignore_zero=ignore_zero, backup_files=backup_files, 
301
306
                    merge_type=merge_type, interesting_ids=interesting_ids)
302
 
        if base_is_ancestor and other_rev_id is not None:
 
307
        if base_is_ancestor and other_rev_id is not None\
 
308
            and other_rev_id not in this_branch.revision_history():
303
309
            this_branch.add_pending_merge(other_rev_id)
304
310
    finally:
305
311
        shutil.rmtree(tempdir)
351
357
            if path == '.':
352
358
                path = ''
353
359
            else:
354
 
                assert path.startswith('./'), "path is %s" % path
 
360
                assert path.startswith('.' + os.sep), "path is %s" % path
355
361
            path = path[2:]
356
362
        adjust_ids.append((path, id))
357
363
    if len(adjust_ids) > 0: