[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Make --accept match conflict handling prompt

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-09-29 21:03:32 CEST

On 9/28/07, Eric Gillespie <epg@google.com> wrote:
> I have another XXX comment in this patch. I know how to test
> editor code on unix:
>
> + # XXX: I know how to test --accept=edit on unix, but not on
> + # other systems...
> + test_file = os.path.abspath(os.path.join(wc_dir, 'conflict-test'))
> + test_editor = "sh -c 'echo $* > %s' 0" % (test_file,)
> + svntest.actions.run_and_verify_svn(None,
> + ['G %s\n' % (rho_path_backup,),
> + 'Updated to revision 2.\n'],
> + [],
> + 'update', '--accept=edit',
> + '--editor-cmd', test_editor,
> + rho_path_backup)
> + got = svntest.main.file_read(test_file)
> + expected = 'tempfile.*\.tmp\n'
> + if not re.match(expected, got):
> + raise svntest.main.Failure('%s !~ %s' % (got, expected))
>
> But I know that won't work on Windows. Is there any way to test
> this portably, or should I only test this when os.name == 'posix'?

Grep the test suite for 'use_editor'.

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Sep 29 21:03:40 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.