Mercurial > hgsubversion
comparison tests/test_fetch_mappings.py @ 963:64d961130a07
editor: do not record invalid path deletion
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Mon, 15 Oct 2012 22:24:29 +0200 |
parents | 8648ccfb8325 |
children | d741f536f23a |
comparison
equal
deleted
inserted
replaced
962:8648ccfb8325 | 963:64d961130a07 |
---|---|
150 # Exercise excluding files copied from a non-excluded directory. | 150 # Exercise excluding files copied from a non-excluded directory. |
151 # There will be missing files as we are copying from an excluded | 151 # There will be missing files as we are copying from an excluded |
152 # directory. | 152 # directory. |
153 repo = self._loadwithfilemap('copies.svndump', "exclude dir2\n", | 153 repo = self._loadwithfilemap('copies.svndump', "exclude dir2\n", |
154 failonmissing=False) | 154 failonmissing=False) |
155 self.assertEqual(['dir/a', 'dir3/a'], list(repo['tip'])) | 155 self.assertEqual(['dir/a', 'dir3/a'], list(repo[2])) |
156 | 156 |
157 def test_file_map_exclude_copy_source_and_dest(self): | 157 def test_file_map_exclude_copy_source_and_dest(self): |
158 # dir3 is excluded and copied from dir2 which is also excluded. | 158 # dir3 is excluded and copied from dir2 which is also excluded. |
159 # dir3 files should not be marked as missing and fetched. | 159 # dir3 files should not be marked as missing and fetched. |
160 repo = self._loadwithfilemap('copies.svndump', | 160 repo = self._loadwithfilemap('copies.svndump', |
161 "exclude dir2\nexclude dir3\n") | 161 "exclude dir2\nexclude dir3\n") |
162 self.assertEqual(['dir/a'], list(repo['tip'])) | 162 self.assertEqual(['dir/a'], list(repo[2])) |
163 | 163 |
164 def test_file_map_include_file_exclude_dir(self): | 164 def test_file_map_include_file_exclude_dir(self): |
165 # dir3 is excluded but we want dir3/a, which is also copied from | 165 # dir3 is excluded but we want dir3/a, which is also copied from |
166 # an exluded dir2. dir3/a should be fetched. | 166 # an exluded dir2. dir3/a should be fetched. |
167 repo = self._loadwithfilemap('copies.svndump', | 167 repo = self._loadwithfilemap('copies.svndump', |
168 "include .\nexclude dir2\nexclude dir3\ninclude dir3/a\n", | 168 "include .\nexclude dir2\nexclude dir3\ninclude dir3/a\n", |
169 failonmissing=False) | 169 failonmissing=False) |
170 self.assertEqual(['dir/a', 'dir3/a'], list(repo['tip'])) | 170 self.assertEqual(['dir/a', 'dir3/a'], list(repo[2])) |
171 | |
172 def test_file_map_delete_dest(self): | |
173 repo = self._loadwithfilemap('copies.svndump', 'exclude dir3\n') | |
174 self.assertEqual(['dir/a', 'dir2/a'], list(repo[3])) | |
171 | 175 |
172 def test_branchmap(self, stupid=False): | 176 def test_branchmap(self, stupid=False): |
173 repo_path = self.load_svndump('branchmap.svndump') | 177 repo_path = self.load_svndump('branchmap.svndump') |
174 branchmap = open(self.branchmap, 'w') | 178 branchmap = open(self.branchmap, 'w') |
175 branchmap.write("badname = good-name # stuffy\n") | 179 branchmap.write("badname = good-name # stuffy\n") |