~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: John Arbash Meinel
  • Date: 2011-04-13 14:47:11 UTC
  • mto: This revision was merged to the branch mainline in revision 5786.
  • Revision ID: john@arbash-meinel.com-20110413144711-n1t3eygituvn0blv
Handle when a file doesn't exist anymore.

I feel like there should be a more elegant fix, like asking
the TreeTransform if it thinks the file should exist, rather
than getting that as fallout from final_name.
For now, I'm ok with it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1134
1134
                    # to go already.
1135
1135
                    continue
1136
1136
            # Move the item into the root
1137
 
            self.tt.adjust_path(self.tt.final_name(trans_id),
1138
 
                                self.tt.root, trans_id)
 
1137
            try:
 
1138
                final_name = self.tt.final_name(trans_id)
 
1139
            except errors.NoFinalPath:
 
1140
                # This file is not present anymore, ignore it.
 
1141
                continue
 
1142
            self.tt.adjust_path(final_name, self.tt.root, trans_id)
1139
1143
        if other_root_is_present:
1140
1144
            self.tt.cancel_creation(other_root)
1141
1145
            self.tt.cancel_versioning(other_root)