~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_core.py

  • Committer: Robert Collins
  • Date: 2005-10-03 01:42:16 UTC
  • Revision ID: robertc@robertcollins.net-20051003014215-ee2990904cc4c7ad
integrate in Gustavos x-bit patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
257
257
            raise Exception("Unhandled merge scenario")
258
258
 
259
259
def make_merged_metadata(entry, base, other):
260
 
    if entry.metadata_change is not None:
261
 
        base_path = base.readonly_path(entry.id)
262
 
        other_path = other.readonly_path(entry.id)    
263
 
        return PermissionsMerge(base_path, other_path)
 
260
    metadata = entry.metadata_change
 
261
    if metadata is None:
 
262
        return None
 
263
    if isinstance(metadata, changeset.ChangeUnixPermissions):
 
264
        if metadata.new_mode is None:
 
265
            return None
 
266
        elif metadata.old_mode is None:
 
267
            return metadata
 
268
        else:
 
269
            base_path = base.readonly_path(entry.id)
 
270
            other_path = other.readonly_path(entry.id)    
 
271
            return PermissionsMerge(base_path, other_path)
264
272
    
265
273
 
266
274
class PermissionsMerge(object):