def bzr_wc_target_exists_local_mods_force():
 test = 'bzr_wc_target_exists_local_mods_force'
 wt = ('%s-test-%s' % (DIR, test))
 puts(magenta(('Executing test: %s' % test)))
 from fabric.api import cd, run
 from fabtools.files import is_dir
 from fabtools import require
 require.bazaar.working_copy(REMOTE_URL, wt)
 assert is_dir(wt)
 with cd(wt):
  assert (run('bzr status') == '')
  run('echo "# a new comment" >> __init__.py')
  assert (run('bzr status') != '')
 require.bazaar.working_copy(REMOTE_URL, wt, force=True)
 assert (run(('bzr status %s' % wt)) == '')

def bzr_wc_target_exists_local_mods_force ( ) : test = 'bzr_wc_target_exists_local_mods_force' wt = ( '%s-test-%s' % ( DIR , test ) ) puts ( magenta ( ( 'Executing test: %s' % test ) ) ) from fabric . api import cd , run from fabtools . files import is_dir from fabtools import require require . bazaar . working_copy ( REMOTE_URL , wt ) assert is_dir ( wt ) with cd ( wt ) : assert ( run ( 'bzr status' ) == '' ) run ( 'echo "# a new comment" >> __init__.py' ) assert ( run ( 'bzr status' ) != '' ) require . bazaar . working_copy ( REMOTE_URL , wt , force = True ) assert ( run ( ( 'bzr status %s' % wt ) ) == '' )
test working copy when a target already exists and has local modifications and force was specified .