comparison tests/test_fetch_renames.py @ 1235:6b15eeb78c1a

editor: fix replay handling for copied + modified symlinks We strip the 'link ' prefix from symlinks when we store it in Mercurial. We reapply it when we start editing the file via open_file, but not via add_file. this means that modified symlniks would replay correctly, but not copied and modified symlinks. This corrects that ommission.
author David Schleimer <dschleimer@fb.com>
date Mon, 07 Apr 2014 18:44:46 -0700
parents d3c79072bc6a
children 4379baf58f9e
comparison
equal deleted inserted replaced
1234:d3c79072bc6a 1235:6b15eeb78c1a
16 w('%s: %r %r\n' % (f, fctx.data(), fctx.renamed())) 16 w('%s: %r %r\n' % (f, fctx.data(), fctx.renamed()))
17 17
18 def test_rename(self): 18 def test_rename(self):
19 config = { 19 config = {
20 'hgsubversion.filestoresize': '0', 20 'hgsubversion.filestoresize': '0',
21 # we set this because we expect all of the copies to be
22 # handled via replay, and we want to notice if that
23 # changes.
24 'hgsubversion.failonmissing': 'yes',
21 } 25 }
22 repo = self._load_fixture_and_fetch('renames.svndump', config=config) 26 repo = self._load_fixture_and_fetch('renames.svndump', config=config)
23 self._run_assertions(repo) 27 self._run_assertions(repo)
24 28
25 def test_rename_with_prefix(self): 29 def test_rename_with_prefix(self):
26 config = { 30 config = {
27 'hgsubversion.filestoresize': '0', 31 'hgsubversion.filestoresize': '0',
32 'hgsubversion.failonmissing': 'yes',
28 } 33 }
29 repo = self._load_fixture_and_fetch('renames_with_prefix.svndump', 34 repo = self._load_fixture_and_fetch('renames_with_prefix.svndump',
30 subdir='prefix', 35 subdir='prefix',
31 config=config) 36 config=config)
32 self._run_assertions(repo) 37 self._run_assertions(repo)