You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Danil Shopyrin <da...@gmail.com> on 2008/08/14 10:58:21 UTC

[PATCH] tolerate locally modified dirs on switch

Hi all!

There is an annoying behavior in the switch command when there are
locally modified directories to delete. Use case is as follows:
* user creates a development branch to do some experiments;
* new folders are created and added to Subversion in the development
branch. There are some unversioned (and ignored) items in
  the added folders (intermediate compiler output files, for example);
* and when user wants to switch back to the trunk he/she gets the
following error from the switch command:
  'Won't delete locally modified directory';
* working copy becomes broken and it is needed to perform long and
nondeterministic (for me, at least) sequence of svn cleanup, svn up
  svn switch commands to heal the working copy.

The problem can be reproduced by the following script:
[[
set REPOS_DIR=C:\test\db
set REPOS=file:///C:/test/db
set WC=C:\test\wc

rd /q /s %REPOS_DIR%
rd /q /s %WC%

svnadmin create %REPOS_DIR%
svn mkdir %REPOS%/branch1 -m ""
svn cp %REPOS%/branch1 %REPOS%/branch2 -m ""

svn co %REPOS%/branch1 %WC%
mkdir %WC%\dir
svn add %WC%\dir
svn ci -m "r1" %WC%

echo file >%WC%\dir\file

svn sw %REPOS%/branch2 %WC%
]]

The better behavior is to leave locally modified directory unversioned
just like svn update command does. Here is a patch.

Please note that the patch doesn't introduce really new behavior. It
just makes switch command behavior more consistent with
other commands behavior.

The log message is as follows:
[[[
Make switch continue after deleting locally modified directories, as
it update and merge do.

* subversion/libsvn_wc/update_editor:
 (leftmod_error_chain): Remove unused helper.
 (do_entry_deletion): Ignore SVN_ERR_WC_LEFT_LOCAL_MOD error as it
 log.c:log_do_delete_entry() does.

* subversion/tests/cmdline/switch_tests.py:
 (tollerate_local_mods): New test.
 (test_list): Run the new test.
]]]

The patch itself is in attachment.

--
With best regards,
Danil Shopyrin
VisualSVN Team

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Danil Shopyrin wrote on Thu, 28 Aug 2008 at 18:26 +0400:
> > Okay.  My 'make check' (on Windows) seems broken; once I fix it (or boot
> > a Linux), I'll commit the patch.
> 
> That's good! Thanks!
> 
> 

Committed revision 32790, and nominated for backport.

Thanks for the patch!

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Danil Shopyrin <da...@gmail.com>.
> Okay.  My 'make check' (on Windows) seems broken; once I fix it (or boot
> a Linux), I'll commit the patch.

That's good! Thanks!

-- 
With best regards,
Danil Shopyrin
VisualSVN Team

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Okay, I finally did the historical digging I wanted to do before
committing.  (Sorry for not getting to it sooner.)  More below...

Danil Shopyrin wrote on Fri, 22 Aug 2008 at 23:20 +0400:
> >> -      return svn_error_createf
> >> -        (SVN_ERR_WC_OBSTRUCTED_UPDATE, tmp_err,
> >
> > (not related to the patch)
> > Doesn't this code leak the parent error of tmp_err?
> 
> Looks like that. This can be fixed by the new patch.
> 

Okay.

> > This has two differences from the previous code:
> >
> > * This code removes the logfile when the error is *not*
> >  SVN_ERR_WC_LEFT_LOCAL_MOD, the existing code removes the logfile when
> >  the error *is* SVN_ERR_WC_LEFT_LOCAL_MOD.
> 
> I think that the existing code should delete logfile in both cases. In
> the case of error different from SVN_ERR_WC_LEFT_LOCAL_MOD the whole
> operation is aborted (in the existing code) and logfile should be
> deleted.
> 

Your patch does something different -- it just ignores the logfile 
completely -- and IMO is right doing so, since it also stops throwing
the LEFT_LOCAL_MOD error back to the caller.

> > * The existing code checks for SVN_ERR_WC_LEFT_LOCAL_MOD anywhere in the
> >  error chain, not just as the top-most error.
> 
> This change is avoided in the new patch.
> 

Okay.  (Since both versions of the check worked, I guess LEFT_LOCAL_MOD
is always the top-most error.  Which explains why the "potential error
leak" above hasn't been caught yet: in this case, it isn't a leak.)

> The new log message is as follows:
> [[[
> Fix issue #2505: make switch continue after deleting locally modified
> directories, as it update and merge do.
> 
> * subversion/libsvn_wc/update_editor:
>   (leftmod_error_chain): tolerate SVN_ERR_WC_LEFT_LOCAL_MOD. The
>    whole error is cleared and SVN_NO_ERROR is returned if
>    SVN_ERR_WC_LEFT_LOCAL_MOD error is found in the error chain. And
>    we don't delete logfile in that case.
>   (do_entry_deletion): svn_wc_remove_from_revision_control() is called
>    with instant_error = FALSE.
> 
> * subversion/tests/cmdline/switch_tests.py:
>   (tolerate_local_mods): New test.
>   (test_list): Run the new test.
> ]]]
> 
> The new patch is attached.
> 
> 

Okay.  My 'make check' (on Windows) seems broken; once I fix it (or boot
a Linux), I'll commit the patch.

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Danil Shopyrin <da...@gmail.com>.
> When you see "s/FOO/BAR/", it means
>
>   "substitute all instances of FOO with BAR"
>
> It comes from Perl text replacement syntax, but is now often used to
> give editing hints -- by now, probably more people use this syntax than
> have ever written Perl code :-).

Thanks for the explanation! :)

-- 
With best regards,
Danil Shopyrin
VisualSVN Team

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Neels Hofmeyr <ne...@elego.de>.
And first apply  s/ed/\&, ed, sed, vim, etc./  to Bruce's command, and
"etc." is not a program ;)

Bruce Elrick wrote:
> s/Perl/ed/g, even :-)
> 
> On Sat, Aug 23, 2008 at 1:14 PM, Karl Fogel <kf...@red-bean.com> wrote:
> 
>> "Danil Shopyrin" <da...@gmail.com> writes:
>>>> Nits:  s/it//, and (symbol_name)s should be indented two spaces, not
>> one.
>>> I'm not sure that I understand this notation properly, but I've tried
>>> to make log message formatted just like examples in the hacking.html.
>>> I've found indenting errors, but I'm not sure that I've found all of
>>> them.
>>>
>>>> s/tollerate/tolerate/
>>> The same.
>> When you see "s/FOO/BAR/", it means
>>
>>   "substitute all instances of FOO with BAR"
>>
>> It comes from Perl text replacement syntax, but is now often used to
>> give editing hints -- by now, probably more people use this syntax than
>> have ever written Perl code :-).
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>> For additional commands, e-mail: dev-help@subversion.tigris.org
>>
>>
> 
> 

-- 
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696  mobile: +49 177 2345869  fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194


Re: [PATCH] tolerate locally modified dirs on switch

Posted by Bruce Elrick <br...@elrick.ca>.
s/Perl/ed/g, even :-)

On Sat, Aug 23, 2008 at 1:14 PM, Karl Fogel <kf...@red-bean.com> wrote:

> "Danil Shopyrin" <da...@gmail.com> writes:
> >> Nits:  s/it//, and (symbol_name)s should be indented two spaces, not
> one.
> >
> > I'm not sure that I understand this notation properly, but I've tried
> > to make log message formatted just like examples in the hacking.html.
> > I've found indenting errors, but I'm not sure that I've found all of
> > them.
> >
> >> s/tollerate/tolerate/
> >
> > The same.
>
> When you see "s/FOO/BAR/", it means
>
>   "substitute all instances of FOO with BAR"
>
> It comes from Perl text replacement syntax, but is now often used to
> give editing hints -- by now, probably more people use this syntax than
> have ever written Perl code :-).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>


-- 
Bruce Elrick
bruce@elrick.ca
bruce.elrick@gmail.com

Science has proof without any certainty. Creationists have certainty without
any proof.
-- Ashley Montague

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Karl Fogel <kf...@red-bean.com>.
"Danil Shopyrin" <da...@gmail.com> writes:
>> Nits:  s/it//, and (symbol_name)s should be indented two spaces, not one.
>
> I'm not sure that I understand this notation properly, but I've tried
> to make log message formatted just like examples in the hacking.html.
> I've found indenting errors, but I'm not sure that I've found all of
> them.
>
>> s/tollerate/tolerate/
>
> The same.

When you see "s/FOO/BAR/", it means

   "substitute all instances of FOO with BAR"

It comes from Perl text replacement syntax, but is now often used to
give editing hints -- by now, probably more people use this syntax than
have ever written Perl code :-).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Danil Shopyrin wrote on Fri, 22 Aug 2008 at 23:29 +0400:
> > [[[
> > Fix issue #2505: make switch continue after deleting locally modified
> > directories, as it update and merge do.
> >
> > * subversion/libsvn_wc/update_editor:
> >  (leftmod_error_chain): tolerate SVN_ERR_WC_LEFT_LOCAL_MOD. The
> >   whole error is cleared and SVN_NO_ERROR is returned if
> >   SVN_ERR_WC_LEFT_LOCAL_MOD error is found in the error chain. And
> >   we don't delete logfile in that case.
> >  (do_entry_deletion): svn_wc_remove_from_revision_control() is called
> >   with instant_error = FALSE.
> >
> > * subversion/tests/cmdline/switch_tests.py:
> >  (tolerate_local_mods): New test.
> >  (test_list): Run the new test.
> > ]]]
> 
> I'm sorry. But the formatting is broken by my GMail. Rightly formatted
> log message is included as an attachment.
> 
> 

It looked fine here (see above).  I'm a bit busy this week but I'll look 
at this patch properly when I have some time for svn again.  (If no one 
else beats me to it :)).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Danil Shopyrin <da...@gmail.com>.
> [[[
> Fix issue #2505: make switch continue after deleting locally modified
> directories, as it update and merge do.
>
> * subversion/libsvn_wc/update_editor:
>  (leftmod_error_chain): tolerate SVN_ERR_WC_LEFT_LOCAL_MOD. The
>   whole error is cleared and SVN_NO_ERROR is returned if
>   SVN_ERR_WC_LEFT_LOCAL_MOD error is found in the error chain. And
>   we don't delete logfile in that case.
>  (do_entry_deletion): svn_wc_remove_from_revision_control() is called
>   with instant_error = FALSE.
>
> * subversion/tests/cmdline/switch_tests.py:
>  (tolerate_local_mods): New test.
>  (test_list): Run the new test.
> ]]]

I'm sorry. But the formatting is broken by my GMail. Rightly formatted
log message is included as an attachment.

-- 
With best regards,
Danil Shopyrin
VisualSVN Team

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Danil Shopyrin <da...@gmail.com>.
Daniel,

thanks for a good patch review!

It takes some time to deal with your precise remarks and now I'm ready
to provide the new version of the patch. I've decided firstly fix
issue #2505 and then fix other problems that (maybe) are present in
the existing code.

To your remarks:

> Nits:  s/it//, and (symbol_name)s should be indented two spaces, not one.

I'm not sure that I understand this notation properly, but I've tried
to make log message formatted just like examples in the hacking.html.
I've found indenting errors, but I'm not sure that I've found all of
them.

> s/tollerate/tolerate/

The same.

>> -      return svn_error_createf
>> -        (SVN_ERR_WC_OBSTRUCTED_UPDATE, tmp_err,
>
> (not related to the patch)
> Doesn't this code leak the parent error of tmp_err?

Looks like that. This can be fixed by the new patch.

> This has two differences from the previous code:
>
> * This code removes the logfile when the error is *not*
>  SVN_ERR_WC_LEFT_LOCAL_MOD, the existing code removes the logfile when
>  the error *is* SVN_ERR_WC_LEFT_LOCAL_MOD.

I think that the existing code should delete logfile in both cases. In
the case of error different from SVN_ERR_WC_LEFT_LOCAL_MOD the whole
operation is aborted (in the existing code) and logfile should be
deleted.

> * The existing code checks for SVN_ERR_WC_LEFT_LOCAL_MOD anywhere in the
>  error chain, not just as the top-most error.

This change is avoided in the new patch.

The new log message is as follows:
[[[
Fix issue #2505: make switch continue after deleting locally modified
directories, as it update and merge do.

* subversion/libsvn_wc/update_editor:
  (leftmod_error_chain): tolerate SVN_ERR_WC_LEFT_LOCAL_MOD. The
   whole error is cleared and SVN_NO_ERROR is returned if
   SVN_ERR_WC_LEFT_LOCAL_MOD error is found in the error chain. And
   we don't delete logfile in that case.
  (do_entry_deletion): svn_wc_remove_from_revision_control() is called
   with instant_error = FALSE.

* subversion/tests/cmdline/switch_tests.py:
  (tolerate_local_mods): New test.
  (test_list): Run the new test.
]]]

The new patch is attached.

-- 
With best regards,
Danil Shopyrin
VisualSVN Team

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
(This is issue #2505, as noted elsewhere in the thread.)

Danil Shopyrin wrote on Thu, 14 Aug 2008 at 14:58 +0400:
> Hi all!
> 
> There is an annoying behavior in the switch command when there are
> locally modified directories to delete. Use case is as follows:
> * user creates a development branch to do some experiments;
> * new folders are created and added to Subversion in the development
> branch. There are some unversioned (and ignored) items in
>   the added folders (intermediate compiler output files, for example);
> * and when user wants to switch back to the trunk he/she gets the
> following error from the switch command:
>   'Won't delete locally modified directory';
> * working copy becomes broken and it is needed to perform long and
> nondeterministic (for me, at least) sequence of svn cleanup, svn up
>   svn switch commands to heal the working copy.
> 
> The problem can be reproduced by the following script:
> [[
> set REPOS_DIR=C:\test\db
> set REPOS=file:///C:/test/db
> set WC=C:\test\wc
> 
> rd /q /s %REPOS_DIR%
> rd /q /s %WC%
> 
> svnadmin create %REPOS_DIR%
> svn mkdir %REPOS%/branch1 -m ""
> svn cp %REPOS%/branch1 %REPOS%/branch2 -m ""
> 
> svn co %REPOS%/branch1 %WC%
> mkdir %WC%\dir
> svn add %WC%\dir
> svn ci -m "r1" %WC%
> 
> echo file >%WC%\dir\file
> 
> svn sw %REPOS%/branch2 %WC%
> ]]
> 
> The better behavior is to leave locally modified directory unversioned
> just like svn update command does. Here is a patch.
> 
> Please note that the patch doesn't introduce really new behavior. It
> just makes switch command behavior more consistent with
> other commands behavior.
> 
> The log message is as follows:
> [[[
> Make switch continue after deleting locally modified directories, as
> it update and merge do.
> 
> * subversion/libsvn_wc/update_editor:
>  (leftmod_error_chain): Remove unused helper.
>  (do_entry_deletion): Ignore SVN_ERR_WC_LEFT_LOCAL_MOD error as it
>  log.c:log_do_delete_entry() does.
> 

Nits:  s/it//, and (symbol_name)s should be indented two spaces, not one.

> * subversion/tests/cmdline/switch_tests.py:
>  (tollerate_local_mods): New test.
>  (test_list): Run the new test.

s/tollerate/tolerate/

> ]]]

> Index: subversion/libsvn_wc/update_editor.c
> ===================================================================
> --- subversion/libsvn_wc/update_editor.c	(revision 32393)
> +++ subversion/libsvn_wc/update_editor.c	(working copy)
> @@ -1061,47 +1061,7 @@
>  }
>  
>  
> -/* Helper for delete_entry().
> -
> -   Search an error chain (ERR) for evidence that a local mod was left.
> -   If so, cleanup LOGFILE and return an appropriate error.  Otherwise,
> -   just return the original error chain.
> -*/
>  static svn_error_t *
> -leftmod_error_chain(svn_error_t *err,
> -                    const char *logfile,
> -                    const char *path,
> -                    apr_pool_t *pool)
> -{
> -  svn_error_t *tmp_err;
> -
> -  if (! err)
> -    return SVN_NO_ERROR;
> -
> -  /* Advance TMP_ERR to the part of the error chain that reveals that
> -     a local mod was left, or to the NULL end of the chain. */
> -  for (tmp_err = err; tmp_err; tmp_err = tmp_err->child)
> -    if (tmp_err->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD)
> -      break;
> -
> -  /* If we found a "left a local mod" error, wrap and return it.
> -     Otherwise, we just return our top-most error. */
> -  if (tmp_err)
> -    {
> -      /* Remove the LOGFILE (and eat up errors from this process). */
> -      svn_error_clear(svn_io_remove_file(logfile, pool));
> -
> -      return svn_error_createf
> -        (SVN_ERR_WC_OBSTRUCTED_UPDATE, tmp_err,

(not related to the patch)
Doesn't this code leak the parent error of tmp_err?

> -         _("Won't delete locally modified directory '%s'"),
> -         svn_path_local_style(path, pool));
> -    }
> -
> -  return err;
> -}
> -
> -
> -static svn_error_t *
>  do_entry_deletion(struct edit_baton *eb,
>                    const char *parent_path,
>                    const char *path,
> @@ -1163,6 +1123,7 @@
>  
>        if (entry->kind == svn_node_dir)
>          {
> +          svn_error_t *err;
>            svn_wc_adm_access_t *child_access;
>            const char *logfile_path
>              = svn_wc__adm_path(parent_path, FALSE, pool,
> @@ -1172,16 +1133,25 @@
>                    (&child_access, eb->adm_access,
>                     full_path, pool));
>  
> -          SVN_ERR(leftmod_error_chain
> -                  (svn_wc_remove_from_revision_control
> -                   (child_access,
> -                    SVN_WC_ENTRY_THIS_DIR,
> -                    TRUE, /* destroy */
> -                    TRUE, /* instant error */
> -                    eb->cancel_func,
> -                    eb->cancel_baton,
> -                    pool),
> -                   logfile_path, parent_path, pool));
> +          err = svn_wc_remove_from_revision_control
> +                (child_access,
> +                 SVN_WC_ENTRY_THIS_DIR,
> +                 TRUE,  /* destroy */
> +                 FALSE, /* instant error */
> +                 eb->cancel_func,
> +                 eb->cancel_baton,
> +                 pool);
> +          
> +          if (err && err->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD)
> +            {
> +              svn_error_clear(err);
> +            }
> +          else if (err)
> +            {
> +              /* Remove the LOGFILE (and eat up errors from this process). */
> +              svn_error_clear(svn_io_remove_file(logfile_path, pool));

This has two differences from the previous code:

* This code removes the logfile when the error is *not*
  SVN_ERR_WC_LEFT_LOCAL_MOD, the existing code removes the logfile when
  the error *is* SVN_ERR_WC_LEFT_LOCAL_MOD.

* The existing code checks for SVN_ERR_WC_LEFT_LOCAL_MOD anywhere in the
  error chain, not just as the top-most error.
  
Any reason for these two changes?  I expected -- and the log message
says -- the only change to be the handling of LEFT_LOCAL_MOD error
(ignoring it or not).

Thanks for the patch :)

Daniel

> +              return err;
> +            }
>          }
>      }
>  
> Index: subversion/tests/cmdline/switch_tests.py
> ===================================================================
> --- subversion/tests/cmdline/switch_tests.py	(revision 32393)
> +++ subversion/tests/cmdline/switch_tests.py	(working copy)
> @@ -2108,6 +2108,53 @@
>                                          expected_disk,
>                                          expected_status)
>  
> +#----------------------------------------------------------------------
> +# Make sure that switch continue after deleting locally modified
> +# directories, as it update and merge do.
> +
> +def tollerate_local_mods(sbox):
> +  "tollerate deletion of a directory with local mods"
> +
> +  sbox.build()
> +  wc_dir = sbox.wc_dir
> +
> +  A_path = os.path.join(wc_dir, 'A')
> +  L_path = os.path.join(A_path, 'L')
> +  LM_path = os.path.join(L_path, 'local_mod')
> +  A_url = sbox.repo_url + '/A'
> +  A2_url = sbox.repo_url + '/A2'
> +
> +  svntest.actions.run_and_verify_svn(None,
> +                                     ['\n', 'Committed revision 2.\n'], [],
> +                                     'cp', '-m', 'make copy', A_url, A2_url)
> +
> +  os.mkdir(L_path)
> +  svntest.main.run_svn(None, 'add', L_path)
> +  svntest.main.run_svn(None, 'ci', '-m', 'Commit added folder', wc_dir)
> +
> +  # locally modified unversioned file
> +  svntest.main.file_write(LM_path, 'Locally modified file.\n', 'w+')
> +
> +  expected_output = svntest.wc.State(wc_dir, {
> +    'A/L' : Item(status='D '),
> +    })
> +
> +  expected_disk = svntest.main.greek_state.copy()
> +  expected_disk.add({
> +    'A/L' : Item(),
> +    'A/L/local_mod' : Item(contents='Locally modified file.\n'),
> +    })
> +
> +  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
> +  expected_status.tweak('', 'iota', wc_rev=1)
> +  expected_status.tweak('A', switched='S')
> +
> +  # Used to fail with locally modified or unversioned files
> +  svntest.actions.run_and_verify_switch(wc_dir, A_path, A2_url,
> +                                        expected_output,
> +                                        expected_disk,
> +                                        expected_status)
> +
>  ########################################################################
>  # Run the tests
>  
> @@ -2142,6 +2189,7 @@
>                switch_urls_with_spaces,
>                switch_to_dir_with_peg_rev2,
>                switch_to_root,
> +              tollerate_local_mods,
>               ]
>  
>  if __name__ == '__main__':

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Danil Shopyrin <da...@visualsvn.com>.
> I think this is issue #2505 (which was a dupe of issue #2466 that I raised
> over 2 years ago).

Good point Matt!

Here is the updated log message:
[[[
Fix issue #2505: make switch continue after deleting locally modified
directories, as
it update and merge do.

* subversion/libsvn_wc/update_editor:
 (leftmod_error_chain): Remove unused helper.
 (do_entry_deletion): Ignore SVN_ERR_WC_LEFT_LOCAL_MOD error as it
 log.c:log_do_delete_entry() does.

* subversion/tests/cmdline/switch_tests.py:
 (tollerate_local_mods): New test.
 (test_list): Run the new test.
]]]

-- 
With best regards,
Danil Shopyrin
VisualSVN Team

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] tolerate locally modified dirs on switch

Posted by Matt Doran <ma...@papercut.com>.
Danil Shopyrin wrote:
> Hi all!
>
> There is an annoying behavior in the switch command when there are
> locally modified directories to delete. Use case is as follows:
> * user creates a development branch to do some experiments;
> * new folders are created and added to Subversion in the development
> branch. There are some unversioned (and ignored) items in
>   the added folders (intermediate compiler output files, for example);
> * and when user wants to switch back to the trunk he/she gets the
> following error from the switch command:
>   'Won't delete locally modified directory';
> * working copy becomes broken and it is needed to perform long and
> nondeterministic (for me, at least) sequence of svn cleanup, svn up
>   svn switch commands to heal the working copy.
>   

It is an annoying behavior... and one I'm nervous of hitting whenever I 
switch.  I'm sure wc-ng will fix all this. :)

I think this is issue #2505 (which was a dupe of issue #2466 that I 
raised over 2 years ago).

http://subversion.tigris.org/issues/show_bug.cgi?id=2505

Cheers,
Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org