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

Re: Tackling Issue 571

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-07-01 17:57:29 CEST

Shlomi Fish <shlomif@vipe.technion.ac.il> writes:

> I'm trying to solve issue 571:
>
> Now, delete and add_file_or_dir call callbacks in the upper layers, which
> do not accept a flag that indicates the distance variable.
>
> So, how should I tell delete no to emit a message, and tell
> add_file_or_dir to emit a replace one? Should I implement the same logic
> in the delete_entry and close_file handlers as exists here to get the
> distance? Or should I add a parameter to the callback? (thus maybe
> breaking the API)

I don't think the libsvn_wc 'update editor' should have any knowledge
of the node identities. There's no way it can know, and there's no
reaso it *needs* to know. If a path is deleted, and the exact same
path is added, we should print an 'R' instead of a 'D, A'.

The logic you want is this:

* if a file is opened/closed (update_editor.c:open_file/close_file),
  then we send a 'U'pdated notification. That's what we already do.

* if a file is deleted (update_editor.c:delete_entry), remember this
  fact in the edit_baton (the major context). Don't print anything.

* if a file is added, look in the edit_baton to see if the same path
  was previously deleted. If so, send an 'R'eplaced notification
  instead of an 'A'dded notification.

* if a directory is closed, and there are still paths that were
  deleted but never re-added, *then* send all of the 'D'eleted
  signals.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 1 17:58:55 2003

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.