~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

(jelmer) Reduce the number of connections made during "bzr branch
 --stacked". (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
 
219
219
"""
220
220
 
221
 
from __future__ import absolute_import
222
 
 
223
221
import bisect
224
222
import errno
225
223
import operator
1561
1559
                    else:
1562
1560
                        source_path = child_basename
1563
1561
                    if new_path_utf8:
1564
 
                        target_path = \
1565
 
                            new_path_utf8 + source_path[len(old_path_utf8):]
 
1562
                        target_path = new_path_utf8 + source_path[len(old_path):]
1566
1563
                    else:
1567
 
                        if old_path_utf8 == '':
 
1564
                        if old_path == '':
1568
1565
                            raise AssertionError("cannot rename directory to"
1569
1566
                                                 " itself")
1570
 
                        target_path = source_path[len(old_path_utf8) + 1:]
 
1567
                        target_path = source_path[len(old_path) + 1:]
1571
1568
                    adds.append((None, target_path, entry[0][2], entry[1][1], False))
1572
1569
                    deletes.append(
1573
1570
                        (source_path, target_path, entry[0][2], None, False))
1574
 
                deletes.append(
1575
 
                    (old_path_utf8, new_path_utf8, file_id, None, False))
1576
 
 
 
1571
                deletes.append((old_path_utf8, new_path, file_id, None, False))
1577
1572
        self._check_delta_ids_absent(new_ids, delta, 1)
1578
1573
        try:
1579
1574
            # Finish expunging deletes/first half of renames.