~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-07 17:20:51 UTC
  • mfrom: (1551.9.10 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20061207172051-43fe52677c8dfb85
Fix bugs in execute bit handling by revert

Show diffs side-by-side

added added

removed removed

Lines of Context:
1271
1271
                    if versioned == (True, True):
1272
1272
                        tt.unversion_file(trans_id)
1273
1273
                        tt.version_file(file_id, new_trans_id)
 
1274
                    # New contents should have the same unix perms as old
 
1275
                    # contents
1274
1276
                    mode_id = trans_id
1275
1277
                    trans_id = new_trans_id
1276
1278
            if kind[1] == 'directory':
1280
1282
                                  trans_id)
1281
1283
            elif kind[1] == 'file':
1282
1284
                tt.create_file(target_tree.get_file_lines(file_id),
1283
 
                               trans_id)
1284
 
                if executable[0] != executable[1]:
 
1285
                               trans_id, mode_id)
 
1286
                # preserve the execute bit when backing up
 
1287
                if keep_content and executable[0] == executable[1]:
1285
1288
                    tt.set_executability(executable[1], trans_id)
1286
1289
            else:
1287
1290
                assert kind[1] is None
1292
1295
        if (name[1] is not None and 
1293
1296
            (name[0] != name[1] or parent[0] != parent[1])):
1294
1297
            tt.adjust_path(name[1], tt.trans_id_file_id(parent[1]), trans_id)
 
1298
        if executable[0] != executable[1] and kind[1] == "file":
 
1299
            tt.set_executability(executable[1], trans_id)
1295
1300
 
1296
1301
 
1297
1302
def resolve_conflicts(tt, pb=DummyProgress(), pass_func=None):