You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Markus Schaber <m....@codesys.com> on 2013/06/11 13:13:44 UTC

[Patch] Fix for issue 4364

Hi,

See attached the patch to fix issue 4364.

[[[
Fix issue #4364: Correctly remove the stale entries from the lock table when committing deletions.

* subversion/libsvn_client/commit.c
  (post_process_commit_item): always pass the flag to remove locks for deleted and replaced items.

* subversion/libsvn_wc/wc-queries.sql
  Add a new query which removes all lock rows recursively for a node.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_base_remove): Add a new parameter remove_locks to recursively remove the lock rows.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_base_remove): Forward the new remove_locks parameter to db_base_remove.
  (db_base_remove): Add and implement remove_locks.
  (commit_node): Also remove the locks recursively for subnodes of the current node.
  (bump_node_revision): Pass FALSE for remove_locks to get the old default behaviour.

* subversion/libsvn_wc/adm_ops.c
  (process_committed_leaf): In the shortcut for deleted nodes, pass TRUE to remove the locks recursively.

* subversion/libsvn_wc/crop.c
  (crop_children): Pass FALSE for remove_locks to get the old default behaviour.

* subversion/libsvn_wc/externals.c
  (svn_wc__external_remove): Pass FALSE for remove_locks to get the old default behaviour.

* subversion/libsvn_wc/update_editor.c
  (delete_entry, close_edit): Pass FALSE for remove_locks to get the old default behaviour.

* subversion/libsvn_wc/workqueue.c
  (run_base_remove): Pass FALSE for remove_locks to get the old default behaviour.

* subversion/tests/libsvn_wc/op-depth-test.c
  (base_dir_insert_remove): Pass FALSE for remove_locks to get the old default behaviour.

* subversion/tests/cmdline/lock_tests.py
  (def drop_locks_on_parent_deletion): Provide a regression test which catches reappearing locks.

]]]


Best regards

Markus Schaber

(This email was sent from a mobile device...)

CODESYS® a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions
________________________________
3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.schaber@codesys.com | Web: codesys.com
CODESYS internet forum: forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

Re: [Patch] Fix for issue 4364

Posted by Daniel Shahaf <da...@elego.de>.
Review of the formatting only (not of the patch substance):

Markus Schaber wrote on Tue, Jun 11, 2013 at 11:13:44 +0000:
> * subversion/libsvn_wc/adm_ops.c
>   (process_committed_leaf): In the shortcut for deleted nodes, pass TRUE to remove the locks recursively.

Wrap to 80 chars please.

> @@ -240,6 +240,12 @@ post_process_commit_item(svn_wc_committed_queue_t
> +  // When the node was deleted (or replaced), we need to always remove the 
> +  // locks, as they're invalidated on the server. We cannot honor the 
> +  // SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN flag here because it does not tell
> +  // us whether we have locked children.

No C++-style comments.  (They'll break the build.)

> @@ -1892,6 +1942,7 @@ test_list = [ None,
>                locks_stick_over_switch,
>                lock_unlock_deleted,
>                commit_stolen_lock,
> +			  drop_locks_on_parent_deletion,

Use spaces, not tabs.

Cheers,

Daniel