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

Re: [PATCH] Testcase for issue #4642

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 14 Oct 2016 18:53:35 +0000

Stefan wrote on Fri, Oct 14, 2016 at 17:30:57 +0200:
> Add an XFail test for issue #4642 (Setting depth to exclude for a path
> containing unversioned files requires a cleanup afterwards).

Looks good overall. Just a few minor questions:

> +def fold_tree_with_unversioned_items(sbox):
> + "unversioned files in excluded directory"
> + ign_a, ign_b, ign_c, wc_dir = set_up_depthy_working_copies(sbox,
> + infinity=True)

I see that "ign_a" is a preëxisting convention throughout the file.
It's unfortunate we have our own convention, since there's already
a Python convention for an ignored value in a tuple unpacking: using "_"
as the assigned-to variable name.

> + # create an unversioned directory within a versioned one
> + A_path = sbox.ospath('A')
> + A_local_path = os.path.join(A_path, 'A_local')
> + os.mkdir(A_local_path)
> +
> + # Set A to be excluded.
> + svntest.main.run_svn(None, 'update', '--set-depth=exclude', A_path)
> +
> + # try a simple update afterwards
> + svntest.main.run_svn(None, 'update', wc_dir)

Don't we prefer «sbox.simple_update()» for new code?

> @@ -3009,6 +3027,7 @@
> spurious_nodes_row,
> commit_excluded,
> fold_tree_with_deleted_moved_items,
> + fold_tree_with_unversioned_items,

Both of these lines use tabs instead of spaces.
Received on 2016-10-14 20:55:23 CEST

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