You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Phippard <ma...@softlanding.com> on 2006/08/10 19:54:10 UTC
Extending new update --force switch to handle local additions -- also new
related FAQ
I have had a user contact me about a problem they were having. I helped
resolve it and they wanted me to add an FAQ entry. I have attached a
patch for review.
The scenario is that the user contributed a patch to an open source
project using Subversion. The patch included new files, so he ran svn add
so that they would be included in the svn diff output. The patch is
accepted and committed by a committer. The user now runs svn update on
his working copy and it fails because he still has the new files in his
working copy. He feels that update should handle this.
Paul Burba's recent patch added --force option to update. If the file was
in an unversioned status in his working copy, and he used this option,
then update would handle the situation. I think we should consider
extending this feature to do the same thing if the file was a scheduled
add in his working copy. Would it be OK if I enter an issue for this in
the issue tracker? Does anyone have any strong objections to this idea
and does not want it filed? Paul's previous changes do not lose any code
and requires the user to specify --force, so if this could be done, I
think we ought to do it. Especially, since the Subversion workflow led
the user into this scenario.
The attached FAQ talks about the situation and how to get out of it using
svn revert followed by a delete or move. It does not talk about the
upcoming --force option. I am not crazy about the wording of this FAQ as
it seems too specific, so I'd appreciate a better way to write this. I
think our policy would encourage me to just commit the FAQ, but I'd like
to see it worded better first, or get some kind of approval that the
current wording is good enough for now.
Thanks
Mark
Re: Extending new update --force switch to handle local additions -- also
new related FAQ
Posted by Mark Phippard <ma...@softlanding.com>.
Julian Foad <ju...@btopenworld.com> wrote on 08/23/2006 07:04:02 PM:
> Mark Phippard wrote:
> > The scenario is that the user contributed a patch to an open source
> > project using Subversion. The patch included new files, so he ran svn
add
> > so that they would be included in the svn diff output. The patch is
> > accepted and committed by a committer. The user now runs svn update
on
> > his working copy and it fails because he still has the new files in
his
> > working copy. He feels that update should handle this.
>
> Yes, and more. Since we automatically resolve text modifications when
the
> local change is identical to the repository change, I say we ought to
> automatically resolve identical tree operations - add/delete/move
file/dir.
>
> > Paul Burba's recent patch added --force option to update. If the file
was
> > in an unversioned status in his working copy, and he used this option,
> > then update would handle the situation. I think we should consider
> > extending this feature to do the same thing if the file was a
scheduled
> > add in his working copy.
>
> It shouldn't need "force". It should just be part of our normal
behaviour that
> we merge identical changes in the obvious trivial way. Is there any
possible
> difficulty with this? (There is the chance that this is not the
semantically
> correct merge in some cases, but that applies equally to text changes
and to
> tree changes.)
>
> > Would it be OK if I enter an issue for this in the issue tracker?
>
> Certainly - please do.
I entered one last week:
http://subversion.tigris.org/issues/show_bug.cgi?id=2593
> (I have not looked at your FAQ. (It didn't show up as text in my mail
client.)
> I'm sure if it says anything useful at all then it is better to have
it than
> not to have it.)
Here is the FAQ I committed:
http://subversion.tigris.org/faq.html#obstructed-add
I'll have Paul Burba take a look at this when he has some time.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Extending new update --force switch to handle local additions
-- also new related FAQ
Posted by Julian Foad <ju...@btopenworld.com>.
Mark Phippard wrote:
> The scenario is that the user contributed a patch to an open source
> project using Subversion. The patch included new files, so he ran svn add
> so that they would be included in the svn diff output. The patch is
> accepted and committed by a committer. The user now runs svn update on
> his working copy and it fails because he still has the new files in his
> working copy. He feels that update should handle this.
Yes, and more. Since we automatically resolve text modifications when the
local change is identical to the repository change, I say we ought to
automatically resolve identical tree operations - add/delete/move file/dir.
> Paul Burba's recent patch added --force option to update. If the file was
> in an unversioned status in his working copy, and he used this option,
> then update would handle the situation. I think we should consider
> extending this feature to do the same thing if the file was a scheduled
> add in his working copy.
It shouldn't need "force". It should just be part of our normal behaviour that
we merge identical changes in the obvious trivial way. Is there any possible
difficulty with this? (There is the chance that this is not the semantically
correct merge in some cases, but that applies equally to text changes and to
tree changes.)
> Would it be OK if I enter an issue for this in the issue tracker?
Certainly - please do.
(I have not looked at your FAQ. (It didn't show up as text in my mail client.)
I'm sure if it says anything useful at all then it is better to have it than
not to have it.)
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Extending new update --force switch to handle local additions -- also
new related FAQ
Posted by Mark Phippard <ma...@softlanding.com>.
John Peacock <jp...@rowman.com> wrote on 08/10/2006 04:04:01 PM:
> Mark Phippard wrote:
> > Paul Burba's recent patch added --force option to update. If the file
was
> > in an unversioned status in his working copy, and he used this option,
> > then update would handle the situation. I think we should consider
> > extending this feature to do the same thing if the file was a
scheduled
> > add in his working copy. Would it be OK if I enter an issue for this
in
> > the issue tracker? Does anyone have any strong objections to this
idea
> > and does not want it filed? Paul's previous changes do not lose any
code
> > and requires the user to specify --force, so if this could be done, I
> > think we ought to do it. Especially, since the Subversion workflow
led
> > the user into this scenario.
>
> I think your analysis is spot on; Subversion should do the right thing
> in this case as well. The WC code can add the text-base from the
> repository then compare it against the file on disk and determine
> whether the local copy is "modified" vs the server, and display the
> correct status without any user interaction. No information is lost at
> any time (except the "schedule add").
>
> > The attached FAQ talks about the situation and how to get out of it
using
> > svn revert followed by a delete or move. It does not talk about the
> > upcoming --force option. I am not crazy about the wording of this FAQ
as
> > it seems too specific, so I'd appreciate a better way to write this.
>
> I think the FAQ entry is a perfectly understandable way to explain the
> current behavior and how to get around it.
You are making me blush. :)
I think my main concern was whether someone with the problem would find
this FAQ or not. I am not sure if they would connect the update problem
with the patch creation or not. So I was wondering whether a bit more
could be added to make it easier to find in different scenarios.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Extending new update --force switch to handle local additions
-- also new related FAQ
Posted by John Peacock <jp...@rowman.com>.
Mark Phippard wrote:
> Paul Burba's recent patch added --force option to update. If the file was
> in an unversioned status in his working copy, and he used this option,
> then update would handle the situation. I think we should consider
> extending this feature to do the same thing if the file was a scheduled
> add in his working copy. Would it be OK if I enter an issue for this in
> the issue tracker? Does anyone have any strong objections to this idea
> and does not want it filed? Paul's previous changes do not lose any code
> and requires the user to specify --force, so if this could be done, I
> think we ought to do it. Especially, since the Subversion workflow led
> the user into this scenario.
I think your analysis is spot on; Subversion should do the right thing
in this case as well. The WC code can add the text-base from the
repository then compare it against the file on disk and determine
whether the local copy is "modified" vs the server, and display the
correct status without any user interaction. No information is lost at
any time (except the "schedule add").
> The attached FAQ talks about the situation and how to get out of it using
> svn revert followed by a delete or move. It does not talk about the
> upcoming --force option. I am not crazy about the wording of this FAQ as
> it seems too specific, so I'd appreciate a better way to write this.
I think the FAQ entry is a perfectly understandable way to explain the
current behavior and how to get around it.
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Extending new update --force switch to handle local additions -- also new related FAQ
Posted by Madan U Sreenivasan <ma...@collab.net>.
On Fri, 11 Aug 2006 01:24:10 +0530, Mark Phippard <ma...@softlanding.com>
wrote:
[snip]
> The attached FAQ talks about the situation and how to get out of it using
> svn revert followed by a delete or move. It does not talk about the
> upcoming --force option. I am not crazy about the wording of this FAQ as
> it seems too specific, so I'd appreciate a better way to write this.
Two suggestions:
1.
+<p>The reason that you recieved this error is that you still have your
local copy of
+the file in your working copy. The steps to correct this problem are:</p>
The following would be more specific:
+<p>The reason that you recieved this error is that you still have your
local copy of
+the file in your working copy, with a scheduled add. The steps to
correct this problem are:</p>
Pl. note the "with the scheduled add".
That said, we could explain the first step thus:
+ <li>Run the <tt>svn revert</tt> command to remove the scheduled add
within
+ Subversion to remove the scheduled add.</li>
The above two changes would give more clarity to the user, as to *why* he
is doing the revert in the first place.
2. There could be a tiny weeny bit more clarity when saying "Run the svn
revert command". Maybe we could say "Run the svn revert command on the
added files(s)"?
Regards,
Madan.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org