##// END OF EJS Templates
test-convert: test before() and after() conversion actions
Patrick Mezard -
r5805:e422305e default
parent child Browse files
Show More
@@ -46,11 +46,13 b' class mercurial_sink(converter_sink):'
46 self.filemapmode = False
46 self.filemapmode = False
47
47
48 def before(self):
48 def before(self):
49 self.ui.debug(_('run hg sink pre-conversion action\n'))
49 self.wlock = self.repo.wlock()
50 self.wlock = self.repo.wlock()
50 self.lock = self.repo.lock()
51 self.lock = self.repo.lock()
51 self.repo.dirstate.clear()
52 self.repo.dirstate.clear()
52
53
53 def after(self):
54 def after(self):
55 self.ui.debug(_('run hg sink post-conversion action\n'))
54 self.repo.dirstate.invalidate()
56 self.repo.dirstate.invalidate()
55 self.lock = None
57 self.lock = None
56 self.wlock = None
58 self.wlock = None
@@ -274,3 +276,9 b' class mercurial_source(converter_source)'
274 'a')
276 'a')
275 self.convertfp.write('%s %s\n' % (destrev, rev))
277 self.convertfp.write('%s %s\n' % (destrev, rev))
276 self.convertfp.flush()
278 self.convertfp.flush()
279
280 def before(self):
281 self.ui.debug(_('run hg source pre-conversion action\n'))
282
283 def after(self):
284 self.ui.debug(_('run hg source post-conversion action\n'))
@@ -39,3 +39,8 b' hg convert a bogusdir'
39 echo % should succeed
39 echo % should succeed
40 chmod 700 bogusdir
40 chmod 700 bogusdir
41 hg convert a bogusdir
41 hg convert a bogusdir
42
43 echo % test pre and post conversion actions
44 echo 'include b' > filemap
45 hg convert --debug --filemap filemap a partialb | \
46 grep 'run hg'
@@ -112,3 +112,8 b' 3 b'
112 2 c
112 2 c
113 1 d
113 1 d
114 0 e
114 0 e
115 % test pre and post conversion actions
116 run hg source pre-conversion action
117 run hg sink pre-conversion action
118 run hg sink post-conversion action
119 run hg source post-conversion action
General Comments 0
You need to be logged in to leave comments. Login now