Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Loaden on April 04, 2010, 09:29:46 am

Title: patch for svn date format
Post by: Loaden on April 04, 2010, 09:29:46 am
Code
Index: src/build_tools/autorevision/autorevision.cpp

===================================================================

--- src/build_tools/autorevision/autorevision.cpp (revision 6200)

+++ src/build_tools/autorevision/autorevision.cpp (working copy)

@@ -122,6 +122,10 @@

             if(d && d->GetText())
             {
                 date = d->GetText();
+                string::size_type pos = date.find('T');
+                if (pos != string::npos) date[pos] = ' ';
+                pos = date.rfind('.');
+                if (pos != string::npos) date = date.substr(0, pos);
             }
             return 1;
         }

SVN6200:
Quote
/*6198*/
//don't include this header, only configmanager-revision.cpp should do this.
#ifndef AUTOREVISION_H
#define AUTOREVISION_H


#include <wx/string.h>

namespace autorevision
{javascript:void(0);
   const unsigned int svn_revision = 6198;
   const wxString svnRevision(_T("6198"));
   const wxString svnDate(_T("2010-03-30T18:07:42.188563Z"));
}



#endif

Patched:
Quote
/*6198*/
//don't include this header, only configmanager-revision.cpp should do this.
#ifndef AUTOREVISION_H
#define AUTOREVISION_H


#include <wx/string.h>

namespace autorevision
{
   const unsigned int svn_revision = 6198;
   const wxString svnRevision(_T("6198"));
   const wxString svnDate(_T("2010-03-30 18:07:42"));
}



#endif

[attachment deleted by admin]
Title: Re: patch for svn date format
Post by: killerbot on April 04, 2010, 10:39:25 am
applied. Thanks.