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

Re: [PATCH][v3] Sticky depths should work for an excluded dir

From: Kannan <kannanr_at_collab.net>
Date: Wed, 06 Jan 2010 21:53:55 +0530

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bert Huijben wrote:
[..]
> In entries we have two storage locations: On the parent entries file and on
> the entries file of the directory itself.
>
> For the depth argument the parent can only contain exclude and infinity. The
> more detailed statuses are in the second location.
>
> So this part is not necessary and likely to break old code relying on depth
> stored in entries. (WC-NG stores excluded as a separate status).
>
>> /* ### setting depth exclude on a wcroot breaks svn_wc_crop() */
>> Index: subversion/libsvn_wc/wc_db.c
>> ===================================================================
>> --- subversion/libsvn_wc/wc_db.c (revision 893084)
>> +++ subversion/libsvn_wc/wc_db.c (working copy)
>> @@ -3120,9 +3120,6 @@
>> if (flush_entry_cache)
>> flush_entries(pdh);
>>
>> - depth = (depth == svn_depth_exclude) ? svn_depth_exclude
>> - : svn_depth_infinity;
>> -
>> VERIFY_USABLE_PDH(pdh);
>> wcroot = pdh->wcroot;
>> sdb = wcroot->sdb;
>
> This code does the same thing on the WC-NG level. It updates the parent
> data, which in this case should only contain infinity, as with excluded the
> depth would be NULL.

Thank you Philip/Bert for the feedback. Attaching an updated patch
herewith as per Bert's comments.

[[[
Log:
Make `--set-depth (empty|files|immediates) DIR' work, where DIR's depth
had already been set as `exclude'. Only `infinity' works as of now.
Adding a test for the same.

* subversion/libsvn_wc/crop.c
  (svn_wc_crop_tree2): Check the 'base status' of the node here and
   remove the check done using `svn_wc__db_node_hidden()' as it
   marks a node as 'hidden' if status is set as
   `svn_wc__db_status_excluded'.

* subversion/libsvn_wc/update_editor.c
  (complete_directory): Call `svn_wc__set_depth' with the requested
   depth rather than `infinity' by default.

* subversion/tests/cmdline/depth_tests.py
  (update_excluded_path_sticky_depths): New test.

  (info_excluded): Remove the locally imported module `re' and make it
   globally available.

Suggested by: rhuijben
Patch by: Kannan R <kannanr_at_collab.net>
]]]

- --
Thanks & Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBS0S5GXlTqcY7ytmIAQIgOwf/aNtDA8BZPoEWJ4aOYH11Rvlp4/Inojoj
dj1JXO/6S0xcRQQ067pFpmiFyJuoVrYdndIcTurW1z7A+V7+yZ1vr3+2lI6FXnp/
AyAuOMr1n1qOJ1ttPAR9lAjOXMe76EXNig6NdOF9U5FxAedWwIv+XYLoQdAjETmy
yDLK/E5FPt0UIhWfn4S2gGGW1rKlfV1mne4L5Yp0itUZ4A81yjD1Y0KUCV0cH48b
Tf+mv1Tae1LBLTGq/IVl5Flf1WA/Cqsx7McGUVr/1VlShMb+WtSOeoTcLkL/TjDf
aptuyCKdwCQfpRH1XW6HqFKAu+Dl7bhmd0DBzD35VgETb9veK6Pdew==
=FpYH
-----END PGP SIGNATURE-----

Received on 2010-01-06 17:30:59 CET

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