#5805 Ticket text with leading whitespace incorrectly migrate to preformatted markdown blocks

v1.0.0
closed
General
Cory Johns
2015-08-20
2013-02-12
No

https://sourceforge.net/p/mingw/bugs/21/ has preformatted sections but the original classic version looked like http://screencast.com/t/oCRcZFTc Original incorrect escaping aside, this shows a failure for the upgrade script to convert all syntax properly. See more details at https://sourceforge.net/p/allura/tickets/5679/#ec93/64b7

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-02-22
    • size: --> 2
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-01
    • status: open --> in-progress
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-05

    allura:db/5805

    ForgeBlog/forgeblog/tests/test_commands.py passes as does tests/test_migrate.py in forge-classic (which also exercises this functionality).

    Below is the raw text to use as a full test case. Paste it into a classic project ticket and make sure copy/paste preserves it as tabs. Migrate the project and allura should look the same as classic did (no indentation, no preformatting).

    This test program doesn't work (under win2k at least) :
    <BEGIN tstopendir.c>
    #include    <stdio.h>
    #include    <stdlib.h>
    #include    <string.h>
    #include    <limits.h>
    #include    <errno.h>
    #include    <sys/types.h>
    #include    <sys/stat.h>
    #if defined(__MINGW32__)||defined(__CYGWIN__)||defined(_unix)
    #include    <unistd.h>
    #endif
    #include    <dirent.h>
    
    // Mingw32 doesn't seem to have S_IFLNK defined
    #if !defined(S_IFLNK)
    #   define  S_IFLNK     0xa000
    #endif
    #if !defined(PATH_MAX)
    #define PATH_MAX    254
    #endif
    
    int     proc(const  char    *szDirPath)
    {
        char            cType,
                        fname[PATH_MAX],
                        str[PATH_MAX];
        DIR             *pDir;
        struct  dirent  *pDirent;
        struct  stat    Stat;
    
        printf("tstopendir : opendir(\\"%s\\")\\n",szDirPath);
    // opendir() gives an errno=2 if the path has an / or \\ at
    // the end, else it gives a segfault
        pDir=opendir(szDirPath);
        printf("opendir returned %s\\n",pDir?"true":"false");
        if(!pDir)
        {
            fprintf(stderr,"%s: can't opendir (errno=%u=0x%0x)\\n",
                    szDirPath,errno,errno);
            return  2;
        }
    
        for(*fname=0;;)
        {
            pDirent=readdir(pDir);
            if(!pDirent)
                break;
    
            strcpy(fname,pDirent->d_name);
    
            // Ask for more informations about the file
            sprintf(str,"%s/%s",szDirPath,fname);
            stat(str,&Stat);
    
            if(Stat.st_mode&S_IFDIR)
                cType='d';
            else
                if(Stat.st_mode&S_IFREG)
                    cType='-';
                else
                    if(Stat.st_mode&S_IFLNK)
                        cType='l';
                    else
                        cType='?';
    
            printf("%c %12lu %s\\n",cType,Stat.st_size,fname);
        }
    
        closedir(pDir);
        return  0;
    }
    
    int     main(int    argc,char   **argv)
    {
        if(argc!=2)
        {
            fprintf(stderr,"usage: %s path",argv[0]);
            return  1;
        }
    
        return  proc(argv[1]);
    }
    <END tstopendir.c>
    
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-05
    • labels: migration -->
    • status: in-progress --> code-review
     
  • Cory Johns - 2013-03-07
    • qa: Cory Johns
     
  • Cory Johns - 2013-03-07
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-08
    • labels: --> migration
     

Log in to post a comment.