/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/transform.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-06-22 10:30:21 UTC
  • mfrom: (7350.4.3 objects-2a)
  • Revision ID: breezy.the.bot@gmail.com-20190622103021-wp15jfh11qg1m48y
Use paths as keys in merge_modified dictionary.

Merged from https://code.launchpad.net/~jelmer/brz/objects-2a/+merge/368929

Show diffs side-by-side

added added

removed removed

Lines of Context:
2965
2965
                keep_content = False
2966
2966
                if wt_kind == 'file' and (backups or target_kind is None):
2967
2967
                    wt_sha1 = working_tree.get_file_sha1(wt_path)
2968
 
                    if merge_modified.get(file_id) != wt_sha1:
 
2968
                    if merge_modified.get(wt_path) != wt_sha1:
2969
2969
                        # acquire the basis tree lazily to prevent the
2970
2970
                        # expense of accessing it when it's not needed ?
2971
2971
                        # (Guessing, RBC, 200702)
3015
3015
                    basis_path = find_previous_path(target_tree, basis_tree, target_path)
3016
3016
                    if (basis_path is not None and
3017
3017
                            new_sha1 == basis_tree.get_file_sha1(basis_path)):
3018
 
                        if file_id in merge_modified:
3019
 
                            del merge_modified[file_id]
 
3018
                        # If the new contents of the file match what is in basis,
 
3019
                        # then there is no need to store in merge_modified.
 
3020
                        if basis_path in merge_modified:
 
3021
                            del merge_modified[basis_path]
3020
3022
                    else:
3021
 
                        merge_modified[file_id] = new_sha1
 
3023
                        merge_modified[target_path] = new_sha1
3022
3024
 
3023
3025
                    # preserve the execute bit when backing up
3024
3026
                    if keep_content and wt_executable == target_executable: