Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo

subversion
Discussion topic

Back to topic list

[PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo

Author John Skopis <jskopis at backstopsolutions dot com>
Full name John Skopis <jskopis at backstopsolutions dot com>
Date 2009-05-08 13:34:43 PDT
Message Hello,

svnadmin load fails while importing a dump that contains a windows newline in svn:mergeinfo prop. I have not done extensive testing on this patch, but it should work (in that it doesn't segfault when I attempt to import a revision with \r\n in mergeinfo). Be advised I am not actually a developer.

Thanks,
John Skopis
Systems Administration


[[[
* subversion/libsvn_su​br/mergeinfo.c
 (parse_revlist): Ignore windows newlines in svn:mergeinfo
]]]

Index: subversion/libsvn_su​br/mergeinfo.c
====================​====================​====================​=======
--- subversion/libsvn_su​br/mergeinfo.c (revision 37647)
+++ subversion/libsvn_su​br/mergeinfo.c (working copy)
@@ -402,7 +403,7 @@
       svn_revnum_t firstrev;
 
       SVN_ERR(svn_revnum_p​arse(&firstrev, curr, &curr));
- if (*curr != '-' && *curr != '\n' && *curr != ',' && *curr != '*'
+ if (*curr != '-' && *curr != '\n' && *curr != ',' && *curr != '*' && *curr != '\r'
           && curr != end)
         return svn_error_createf(SV​N_ERR_MERGEINFO_PARS​E_ERROR, NULL,
                                  _("Invalid character '%c' found in revision "
@@ -430,8 +431,10 @@
           mrange->end = secondrev;
         }
 
- if (*curr == '\n' || curr == end)
+ if (*curr == '\r' || *curr == '\n' || curr == end)
         {
+ if ( *curr == '\r' )
+ curr++;
           APR_ARRAY_PUSH(revlist, svn_merge_range_t *) = mrange;
           *input = curr;
           return SVN_NO_ERROR;
@@ -445,10 +448,10 @@
         {
           mrange->inheritable = FALSE;
           curr++;
- if (*curr == ',' || *curr == '\n' || curr == end)
+ if (*curr == ',' || *curr == '\n' || *curr == '\r' || curr == end )
             {
               APR_ARRAY_PUSH(revlist, svn_merge_range_t *) = mrange;
- if (*curr == ',')
+ if (*curr == ',' || *curr == '\r' )
                 {
                   curr++;
                 }

« Previous message in topic | 1 of 16 | Next message in topic »

Messages

Show all messages in topic

[PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo John Skopis <jskopis at backstopsolutions dot com> John Skopis <jskopis at backstopsolutions dot com> 2009-05-08 13:34:43 PDT
     Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo glasser David Glasser 2009-05-10 13:33:00 PDT
         Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo bpsm B. Smith-Mannschott 2009-05-10 22:31:18 PDT
             Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo bpsm B. Smith-Mannschott 2009-05-11 01:24:32 PDT
             Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo Daniel Shahaf <d dot s at daniel dot shahaf dot name> Daniel Shahaf <d dot s at daniel dot shahaf dot name> 2009-05-11 07:52:11 PDT
                 Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo Paul Burba <ptburba at gmail dot com> Paul Burba <ptburba at gmail dot com> 2009-05-11 08:49:12 PDT
                     RE: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo John Skopis <jskopis at backstopsolutions dot com> John Skopis <jskopis at backstopsolutions dot com> 2009-05-11 08:54:19 PDT
                         RE: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo Daniel Shahaf <d dot s at daniel dot shahaf dot name> Daniel Shahaf <d dot s at daniel dot shahaf dot name> 2009-05-11 09:38:31 PDT
                 RE: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo John Skopis <jskopis at backstopsolutions dot com> John Skopis <jskopis at backstopsolutions dot com> 2009-05-11 08:52:39 PDT
                     RE: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo Daniel Shahaf <d dot s at daniel dot shahaf dot name> Daniel Shahaf <d dot s at daniel dot shahaf dot name> 2009-05-11 09:49:33 PDT
                         Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo glasser David Glasser 2009-05-11 10:36:20 PDT
                             Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo Paul Burba <ptburba at gmail dot com> Paul Burba <ptburba at gmail dot com> 2009-05-11 14:01:16 PDT
                                 Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo markphip Mark Phippard 2009-05-11 15:21:12 PDT
                                     Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo Paul Burba <ptburba at gmail dot com> Paul Burba <ptburba at gmail dot com> 2009-05-12 09:37:54 PDT
                                         Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo Daniel Shahaf <d dot s at daniel dot shahaf dot name> Daniel Shahaf <d dot s at daniel dot shahaf dot name> 2009-05-12 09:53:35 PDT
     Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo John Skopis <jskopis at backstopsolutions dot com> John Skopis <jskopis at backstopsolutions dot com> 2009-05-11 15:32:28 PDT
Messages per page: