~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-13 19:43:03 UTC
  • mto: This revision was merged to the branch mainline in revision 5724.
  • Revision ID: jelmer@samba.org-20110313194303-9qy69ugg6qfqccag
add skip_special option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
    return dest
152
152
 
153
153
 
154
 
def _export_iter_entries(tree, subdir):
 
154
def _export_iter_entries(tree, subdir, skip_special=True):
155
155
    """Iter the entries for tree suitable for exporting.
156
156
 
157
157
    :param tree: A tree object.
158
158
    :param subdir: None or the path of an entry to start exporting from.
 
159
    :param skip_special: Whether to skip .bzr files.
159
160
    """
160
161
    inv = tree.inventory
161
162
    if subdir is None:
177
178
    for entry in entries:
178
179
        # The .bzr* namespace is reserved for "magic" files like
179
180
        # .bzrignore and .bzrrules - do not export these
180
 
        if entry[0].startswith(".bzr"):
 
181
        if skip_special and entry[0].startswith(".bzr"):
181
182
            continue
182
183
        if subdir is None:
183
184
            if not tree.has_filename(entry[0]):