Peter Samuelson wrote:
> [kfogel@collab.net]
>
>>Hmmm. What you say makes me think that showing a "local mod" (the
>>still-expanded keyword) after the propdel might be at least as useful
>>as automatically contracting the keyword. And showing the local mod
>>alerts the user that there's a conscious decision to be made here.
>
>
> True. The only frustrating thing is that you can't use 'svn revert' to
> get rid of the local mod.
'svn revert' returns the file to a locally unmodified state with no diff,
because it reverts the deletion of the svn:keywords property:
$ echo '$Rev$' > kw
$ svn add kw
$ svn ps svn:keywords rev kw
$ svn ci -m '' kw
$ svn pd svn:keywords kw
$ svn diff
Index: kw
===================================================================
--- kw (revision 1359)
+++ kw (working copy)
@@ -1 +1 @@
-$Rev$
+$Rev: 1359 $
Property changes on: kw
___________________________________________________________________
Name: svn:keywords
- rev
$ svn revert kw
Reverted 'kw'
$ svn diff
[no output]
Did you mean, "you can't use 'svn revert' to contract the keyword" ? That's
certainly true, but that seems logical to me, or at least I don't see any
particular reason why it should do so. If you're stopping using the keyword,
who's to say what you want the text in your file to look like?
> You're left with 'svn diff {f} | patch -R'
> or recopying the text-base file manually.
>
> I tried to do a repository-side 'svn propdel' and of course that
> doesn't exist, for reasons I only remembered afterwards. If it did
> exist, though, obviously it *would* unexpand the keywords, and thus
> would make an argument for WC-side 'svn propdel' doing the same.
I see what you're getting at, and there certainly is some sort of inconsistency
there, but I'm not entirely convinced by your argument. It wouldn't "unexpand"
the keyword in the repository file, it would just result in the keyword not
being expanded by the client, which is subtly different.
What happens if there is an expanded keyword in the repository (which can
easily happen if it wasn't mentioned in the 'svn:keywords' property at first,
but is mentioned later)? In this situation, if the 'svn:keywords' property was
set by a hypothetical remote-propset command, what would then happen at the
client, or what would we want to happen? I'm just asking about this opposite
case in the hope that thinking about it will shed some light on the case that
is the subject of this thread.
Finally, but importantly, why are we only talking about contracting keywords?
Surely, if we expect 'svn' to contract a keyword when we remove its name from
the property, we should also expect it to expand it when we insert its name in
the property.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 16 00:03:33 2006