/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/add.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-25 00:39:16 UTC
  • mfrom: (6926 work)
  • mto: This revision was merged to the branch mainline in revision 6928.
  • Revision ID: jelmer@jelmer.uk-20180325003916-mqa5uj4uq55hrjq9
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import os
23
23
 
24
24
from . import (
 
25
    errors,
25
26
    osutils,
26
27
    ui,
27
28
    )
127
128
        we look for a file with the same name in that directory.
128
129
        Else, we look for an entry in the base tree with the same path.
129
130
        """
130
 
        if self.base_tree.has_id(parent_ie.file_id):
131
 
            base_path = osutils.pathjoin(
132
 
                self.base_tree.id2path(parent_ie.file_id),
133
 
                osutils.basename(path))
 
131
        try:
 
132
            parent_path = self.base_tree.id2path(parent_ie.file_id)
 
133
        except errors.NoSuchId:
 
134
            pass
 
135
        else:
 
136
            base_path = osutils.pathjoin(parent_path, osutils.basename(path))
134
137
            base_id = self.base_tree.path2id(base_path)
135
138
            if base_id is not None:
136
139
                return (base_id, base_path)