"You have to update your working copy" doesn't offer to update

8 views
Skip to first unread message

Daniel Sahlberg

unread,
Nov 21, 2022, 5:43:51 PM11/21/22
to TortoiseSVN-dev
Hi,

There has been reports about commits (and merge?) failing with "You have to update your working copy first" but without the subsequent offer to update.

Today I stumbled on one such case. I traced it to CommitCommand::IsOutOfDate not checking for error 155011 (SVN_ERR_WC_NOT_UP_TO_DATE).

Is there a particular reason not to include this in "IsOutOfDate"?

I'm suggesting a simple patch:

[[[
Index: src/TortoiseProc/Commands/CommitCommand.cpp
===================================================================
--- src/TortoiseProc/Commands/CommitCommand.cpp    (revision 29480)
+++ src/TortoiseProc/Commands/CommitCommand.cpp    (working copy)
@@ -62,6 +62,7 @@
         const apr_status_t errorStatus = pErr->apr_err;
         if ((errorStatus == SVN_ERR_FS_TXN_OUT_OF_DATE) ||
             (errorStatus == SVN_ERR_RA_OUT_OF_DATE) ||
+            (errorStatus == SVN_ERR_WC_NOT_UP_TO_DATE) ||
             (errorStatus == SVN_ERR_FS_CONFLICT))
         {
             return true;
]]]

(And yes, I've got commit bits and can do this myself, but on the principle of knowing what I don't know, I'm asking before committing something stupid).

/Daniel

Stefan

unread,
Nov 22, 2022, 12:31:53 PM11/22/22
to TortoiseSVN-dev
On Monday, November 21, 2022 at 11:43:51 PM UTC+1 daniel.l...@gmail.com wrote:
Hi,

There has been reports about commits (and merge?) failing with "You have to update your working copy first" but without the subsequent offer to update.

Today I stumbled on one such case. I traced it to CommitCommand::IsOutOfDate not checking for error 155011 (SVN_ERR_WC_NOT_UP_TO_DATE).

Is there a particular reason not to include this in "IsOutOfDate"?

The only reason I can think of is that this error code was overlooked.


I'm suggesting a simple patch:


yes, please commit.

Daniel Sahlberg

unread,
Nov 22, 2022, 4:12:21 PM11/22/22
to TortoiseSVN-dev
tisdag 22 november 2022 kl. 18:31:53 UTC+1 skrev Stefan:
yes, please commit.

Thanks for the review. Committed r29482.

/Daniel
 
Reply all
Reply to author
Forward
0 new messages