/breezy-hg/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-hg/trunk

« back to all changes in this revision

Viewing changes to commit.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-19 21:33:07 UTC
  • Revision ID: jelmer@jelmer.uk-20181119213307-k5uhm4776q3mwr52
Fix some more tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        content_summary):
71
71
        raise NotImplementedError(self.record_entry_contents)
72
72
 
73
 
    def record_delete(self, path, file_id):
 
73
    def record_delete(self, path):
74
74
        self._any_changes = True
75
75
        self._removed.append(path.encode("utf-8"))
76
76
        del self._manifest[path.encode("utf-8")]
81
81
             executable) in iter_changes:
82
82
            if kind[1] in ("directory",):
83
83
                if kind[0] in ("file", "symlink"):
84
 
                    self.record_delete(path[0], file_id)
 
84
                    self.record_delete(path[0])
85
85
                if path[1] == u"":
86
86
                    seen_root = True
87
87
                continue
88
88
            if path[1] is None:
89
 
                self.record_delete(path[0], file_id)
 
89
                self.record_delete(path[0])
90
90
                continue
91
91
            utf8_path = path[1].encode("utf-8")
92
92
            fparents = tuple([m.get(utf8_path, mercurial.node.nullid)
99
99
                self._changelist.append(utf8_path)
100
100
            if changed_content:
101
101
                if kind[1] == "file":
102
 
                    text = workingtree.get_file_text(path[1], file_id)
 
102
                    text = workingtree.get_file_text(path[1])
103
103
                elif kind[1] == "symlink":
104
 
                    text = workingtree.get_symlink_target(path[1], file_id).encode("utf-8")
 
104
                    text = workingtree.get_symlink_target(path[1]).encode("utf-8")
105
105
                else:
106
106
                    raise AssertionError
107
107
                meta = {} # for now
115
115
                self._manifest.setflag(utf8_path, 'x')
116
116
            if kind[1] == "symlink":
117
117
                self._manifest.setflag(utf8_path, 'l')
118
 
            f, st = workingtree.get_file_with_stat(path[1], file_id)
 
118
            f, st = workingtree.get_file_with_stat(path[1])
119
119
            yield file_id, path[1], (osutils.sha_file(f), st)
120
120
        if not seen_root and len(self.parents) == 0:
121
121
            raise RootMissing()