You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/05/18 20:58:50 UTC
svn commit: r1124382 - in /subversion/trunk/subversion:
include/svn_error_codes.h libsvn_client/merge.c libsvn_ra_neon/commit.c
Author: steveking
Date: Wed May 18 18:58:49 2011
New Revision: 1124382
URL: http://svn.apache.org/viewvc?rev=1124382&view=rev
Log:
As discussed :http://svn.haxx.se/dev/archive-2011-05/0543.shtml
make it possible for clients to determine the suggested action to resolve
the error from the error code.
* subversion/include/svn_error_codes.h
new error code SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED which indicates that an
update would resolve the problem
* /subversion/libsvn_client\merge.c
(calculate_remaining_ranges)
(ensure_wc_is_suitable_merge_target): return the new error code
* subversion/libsvn_ra_neon/commit.c
(checkout_resource): change error code to SVN_ERR_FS_OUT_OF_DATE indicating
that an update would resolve the problem
Modified:
subversion/trunk/subversion/include/svn_error_codes.h
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_ra_neon/commit.c
Modified: subversion/trunk/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error_codes.h?rev=1124382&r1=1124381&r2=1124382&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_error_codes.h (original)
+++ subversion/trunk/subversion/include/svn_error_codes.h Wed May 18 18:58:49 2011
@@ -1196,6 +1196,11 @@ SVN_ERROR_START
SVN_ERR_CLIENT_CATEGORY_START + 19,
"Detected a cycle while processing the operation")
+ /** @since New in 1.7. */
+ SVN_ERRDEF(SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED,
+ SVN_ERR_CLIENT_CATEGORY_START + 20,
+ "Working copy and merge source not ready for reintegration")
+
/* misc errors */
SVN_ERRDEF(SVN_ERR_BASE,
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1124382&r1=1124381&r2=1124382&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed May 18 18:58:49 2011
@@ -3943,7 +3943,7 @@ calculate_remaining_ranges(svn_client__m
SVN_ERR(svn_wc__node_get_url(&url, ctx->wc_ctx, child->abspath,
scratch_pool, scratch_pool));
if (strcmp(start_url, url) == 0)
- return svn_error_create(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
+ return svn_error_create(SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED, NULL,
_("Cannot reverse-merge a range from a "
"path's own future history; try "
"updating first"));
@@ -9015,7 +9015,7 @@ ensure_wc_is_suitable_merge_target(const
}
if (min_rev != max_rev)
- return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
+ return svn_error_createf(SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED, NULL,
_("Cannot merge into mixed-revision working "
"copy [%lu:%lu]; try updating first"),
min_rev, max_rev);
Modified: subversion/trunk/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/commit.c?rev=1124382&r1=1124381&r2=1124382&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/commit.c Wed May 18 18:58:49 2011
@@ -508,7 +508,7 @@ static svn_error_t * checkout_resource(c
### overly generic. See issue #2740. */
if (err->apr_err == SVN_ERR_FS_CONFLICT)
return svn_error_createf
- (err->apr_err, err,
+ (SVN_ERR_FS_OUT_OF_DATE, err,
_("File or directory '%s' is out of date; try updating"),
svn_relpath_local_style(local_relpath, pool));
return err;
Re: svn commit: r1124382 - in /subversion/trunk/subversion: include/svn_error_codes.h
libsvn_client/merge.c libsvn_ra_neon/commit.c
Posted by Stefan Küng <to...@gmail.com>.
On 24.05.2011 20:30, C. Michael Pilato wrote:
> On 05/19/2011 05:33 AM, Bert Huijben wrote:
>>> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
>
> [...]
>
>>> -1 unless you update svn_client_merge4()'s docstring accordingly, since
>>> it promises a specific error code here.
>>
>> And I think the error code needs another _ between UPDATE and REQUIRED.
>
> I took care of these concerns on steveking's behalf in r1127198. (I rather
> doubt that he follows this list thoroughly, so in the future we should
> probably Cc: him on reviews of his commits.)
Ups, sorry. I usually monitor the emails for a while after I do a commit
and I didn't see anything that wasn't solved immediately (I can only
answer in the evening, my boss wouldn't like it if I start answering
emails during work).
I'll try to monitor the emails longer next time. But remember that it
might take almost a day until I can answer, depending on the time you
send an email.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Re: svn commit: r1124382 - in /subversion/trunk/subversion: include/svn_error_codes.h
libsvn_client/merge.c libsvn_ra_neon/commit.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 05/19/2011 05:33 AM, Bert Huijben wrote:
>> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
[...]
>> -1 unless you update svn_client_merge4()'s docstring accordingly, since
>> it promises a specific error code here.
>
> And I think the error code needs another _ between UPDATE and REQUIRED.
I took care of these concerns on steveking's behalf in r1127198. (I rather
doubt that he follows this list thoroughly, so in the future we should
probably Cc: him on reviews of his commits.)
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
RE: svn commit: r1124382 - in /subversion/trunk/subversion: include/svn_error_codes.h libsvn_client/merge.c libsvn_ra_neon/commit.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
> Sent: donderdag 19 mei 2011 10:19
> To: dev@subversion.apache.org
> Cc: commits@subversion.apache.org
> Subject: Re: svn commit: r1124382 - in /subversion/trunk/subversion:
> include/svn_error_codes.h libsvn_client/merge.c libsvn_ra_neon/commit.c
>
> steveking@apache.org wrote on Wed, May 18, 2011 at 18:58:50 -0000:
> > @@ -9015,7 +9015,7 @@ ensure_wc_is_suitable_merge_target(const
> > }
> >
> > if (min_rev != max_rev)
> > - return
> svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
> > + return
> svn_error_createf(SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED, NULL,
> > _("Cannot merge into mixed-revision
working "
> > "copy [%lu:%lu]; try updating
first"),
> > min_rev, max_rev);
>
> -1 unless you update svn_client_merge4()'s docstring accordingly, since
> it promises a specific error code here.
And I think the error code needs another _ between UPDATE and REQUIRED.
Bert
RE: svn commit: r1124382 - in /subversion/trunk/subversion: include/svn_error_codes.h libsvn_client/merge.c libsvn_ra_neon/commit.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
> Sent: donderdag 19 mei 2011 10:19
> To: dev@subversion.apache.org
> Cc: commits@subversion.apache.org
> Subject: Re: svn commit: r1124382 - in /subversion/trunk/subversion:
> include/svn_error_codes.h libsvn_client/merge.c libsvn_ra_neon/commit.c
>
> steveking@apache.org wrote on Wed, May 18, 2011 at 18:58:50 -0000:
> > @@ -9015,7 +9015,7 @@ ensure_wc_is_suitable_merge_target(const
> > }
> >
> > if (min_rev != max_rev)
> > - return
> svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
> > + return
> svn_error_createf(SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED, NULL,
> > _("Cannot merge into mixed-revision
working "
> > "copy [%lu:%lu]; try updating
first"),
> > min_rev, max_rev);
>
> -1 unless you update svn_client_merge4()'s docstring accordingly, since
> it promises a specific error code here.
And I think the error code needs another _ between UPDATE and REQUIRED.
Bert
Re: svn commit: r1124382 - in /subversion/trunk/subversion:
include/svn_error_codes.h libsvn_client/merge.c
libsvn_ra_neon/commit.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
steveking@apache.org wrote on Wed, May 18, 2011 at 18:58:50 -0000:
> @@ -9015,7 +9015,7 @@ ensure_wc_is_suitable_merge_target(const
> }
>
> if (min_rev != max_rev)
> - return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
> + return svn_error_createf(SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED, NULL,
> _("Cannot merge into mixed-revision working "
> "copy [%lu:%lu]; try updating first"),
> min_rev, max_rev);
-1 unless you update svn_client_merge4()'s docstring accordingly, since
it promises a specific error code here.
Re: svn commit: r1124382 - in /subversion/trunk/subversion:
include/svn_error_codes.h libsvn_client/merge.c
libsvn_ra_neon/commit.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
steveking@apache.org wrote on Wed, May 18, 2011 at 18:58:50 -0000:
> @@ -9015,7 +9015,7 @@ ensure_wc_is_suitable_merge_target(const
> }
>
> if (min_rev != max_rev)
> - return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
> + return svn_error_createf(SVN_ERR_CLIENT_MERGE_UPDATEREQUIRED, NULL,
> _("Cannot merge into mixed-revision working "
> "copy [%lu:%lu]; try updating first"),
> min_rev, max_rev);
-1 unless you update svn_client_merge4()'s docstring accordingly, since
it promises a specific error code here.