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

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
 
17
from io import StringIO
18
18
 
19
19
from breezy import (
20
20
    osutils,
21
21
    trace,
22
22
    )
23
 
from .sixish import (
24
 
    StringIO,
25
 
    )
26
 
from .tree import TreeChange
 
23
from .bzr.inventorytree import InventoryTreeChange
27
24
 
28
25
 
29
26
class TreeDelta(object):
330
327
        exe_change = False
331
328
        # files are "renamed" if they are moved or if name changes, as long
332
329
        # as it had a value
333
 
        if None not in change.name and None not in change.parent_id and\
334
 
                (change.name[0] != change.name[1] or change.parent_id[0] != change.parent_id[1]):
335
 
            if change.copied:
336
 
                copied = True
337
 
                renamed = False
338
 
            else:
339
 
                renamed = True
340
 
                copied = False
 
330
        if change.copied:
 
331
            copied = True
 
332
            renamed = False
 
333
        elif change.renamed:
 
334
            renamed = True
 
335
            copied = False
341
336
        else:
342
337
            copied = False
343
338
            renamed = False
400
395
        dec_new_path = decorate_path(item.path[1], item.kind[1], item.meta_modified())
401
396
        to_file.write(' => %s' % dec_new_path)
402
397
        if item.changed_content or item.meta_modified():
403
 
            extra_modified.append(TreeChange(
 
398
            extra_modified.append(InventoryTreeChange(
404
399
                item.file_id, (item.path[1], item.path[1]),
405
400
                item.changed_content,
406
401
                item.versioned,