{"action":"opened","issue":{"url":"https://api.github.com/repos/viewvc/viewvc/issues/47","repository_url":"https://api.github.com/repos/viewvc/viewvc","labels_url":"https://api.github.com/repos/viewvc/viewvc/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/viewvc/viewvc/issues/47/comments","events_url":"https://api.github.com/repos/viewvc/viewvc/issues/47/events","html_url":"https://github.com/viewvc/viewvc/issues/47","id":177012796,"number":47,"title":"Suggested improvements to visual diff templates [Tigris #258]","user":{"login":"cmpilato","id":1846920,"avatar_url":"https://avatars.githubusercontent.com/u/1846920?v=3","gravatar_id":"","url":"https://api.github.com/users/cmpilato","html_url":"https://github.com/cmpilato","followers_url":"https://api.github.com/users/cmpilato/followers","following_url":"https://api.github.com/users/cmpilato/following{/other_user}","gists_url":"https://api.github.com/users/cmpilato/gists{/gist_id}","starred_url":"https://api.github.com/users/cmpilato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmpilato/subscriptions","organizations_url":"https://api.github.com/users/cmpilato/orgs","repos_url":"https://api.github.com/users/cmpilato/repos","events_url":"https://api.github.com/users/cmpilato/events{/privacy}","received_events_url":"https://api.github.com/users/cmpilato/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/viewvc/viewvc/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/viewvc/viewvc/labels/patch","name":"patch","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/viewvc/viewvc/milestones/1","html_url":"https://github.com/viewvc/viewvc/milestones/*unscheduled*","labels_url":"https://api.github.com/repos/viewvc/viewvc/milestones/1/labels","id":2005075,"number":1,"title":"*unscheduled*","description":"","creator":{"login":"cmpilato","id":1846920,"avatar_url":"https://avatars.githubusercontent.com/u/1846920?v=3","gravatar_id":"","url":"https://api.github.com/users/cmpilato","html_url":"https://github.com/cmpilato","followers_url":"https://api.github.com/users/cmpilato/followers","following_url":"https://api.github.com/users/cmpilato/following{/other_user}","gists_url":"https://api.github.com/users/cmpilato/gists{/gist_id}","starred_url":"https://api.github.com/users/cmpilato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmpilato/subscriptions","organizations_url":"https://api.github.com/users/cmpilato/orgs","repos_url":"https://api.github.com/users/cmpilato/repos","events_url":"https://api.github.com/users/cmpilato/events{/privacy}","received_events_url":"https://api.github.com/users/cmpilato/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":9,"state":"open","created_at":"2016-09-14T20:15:17Z","updated_at":"2016-09-14T20:32:15Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-09-14T20:32:15Z","updated_at":"2016-09-14T20:32:15Z","closed_at":null,"body":"## Description\n\n    The default diff templates use a proportional font which obscures the\n    indentation and spacing in the application code.\n    \n    In addition, long unbreakable lines such as \"*********\" separator comments\n    stretch the page and cause browsers to enable horizontal scrollbars, making it\n    hard to read.\n    \n    I have created a patch that changes the template to use a monospace font, and\n    uses the \"overflow: hidden\" property to truncate lines that attempt to stretch\n    the column.\n    \n    Note that legitimate code will still wrap to the next line instead of being\n    truncated.\n\n## Metadata Imported from Tigris (Issue 258)\n\n  * **Creation Date**: 2006-09-06 08:53:28\n  * **Reporter**: bugmen0t\n  * **Subcomponent**: templates\n  * **Version**: 1.0.1\n  * **Milestone**: *unscheduled*\n  * **Keywords**: patch\n  * **Cc**: gwagenknecht\n\n## Comments\n\n### 2006-09-06 08:54:20 by bugmen0t\n\n    Created an attachment (id=133)\n    Diff formatting improvements\n    \n\n### 2006-10-26 16:41:53 by grimm26\n\n    Created an attachment (id=136)\n    Patch against loginfo-handler from viewvc 1.0.3\n    \n\n### 2006-10-26 16:43:31 by grimm26\n\n    sorry, attachement was meant for issue 257.  Don't see a way to remove it...\n\n### 2009-02-26 07:52:51 by cmpilato\n\n    Moving reviewed-but-not-scheduled issues into a new milestone (to distinguish\n    them from unreviewed one).\n\n\n\n## Attachments\n\n### viewvc_diff_formatting.patch - Diff formatting improvements\n_Posted 2006-09-06 08:54:20 by bugmen0t_\n\n    Index: templates/docroot/styles.css\n    ===================================================================\n    --- templates/docroot/styles.css\t(revision 797)\n    +++ templates/docroot/styles.css\t(revision 799)\n    @@ -113,36 +113,40 @@\n     }\n     .vc_diff_empty {\n       background-color: #cccccc;\n    -  font-family: sans-serif;\n    -  font-size: smaller;\n    +  font-family: monospace;\n    +  font-size: medium;\n     }\n     .vc_diff_add {\n       background-color: #aaffaa;\n    -  font-family: sans-serif;\n    -  font-size: smaller;\n    +  font-family: monospace;\n    +  font-size: medium;\n    +  overflow: hidden;\n     }\n     .vc_diff_remove {\n       background-color: #ffaaaa;\n    -  font-family: sans-serif;\n    -  font-size: smaller;\n    +  font-family: monospace;\n    +  font-size: medium;\n    +  overflow: hidden;\n     }\n     .vc_diff_change {\n       background-color: #ffff77;\n    -  font-family: sans-serif;\n    -  font-size: smaller;\n    +  font-family: monospace;\n    +  font-size: medium;\n    +  overflow: hidden;\n     }\n     .vc_diff_change_empty {\n       background-color: #eeee77;\n    -  font-family: sans-serif;\n    -  font-size: smaller;\n    +  font-family: monospace;\n    +  font-size: medium;\n     }\n     .vc_diff_nochange {\n    -  font-family: sans-serif;\n    -  font-size: smaller;\n    +  font-family: monospace;\n    +  font-size: medium;\n    +  overflow: hidden;\n     }\n     .vc_raw_diff {\n    -  background-color: #cccccc;\n    -  font-size: smaller;\n    +  background-color: #eeeeee;\n    +  font-size: medium;\n     }\n     \n     /*** Intraline Diff Styles ***/\n    Index: templates/diff.ezt\n    ===================================================================\n    --- templates/diff.ezt\t(revision 797)\n    +++ templates/diff.ezt\t(revision 799)\n    @@ -44,34 +44,34 @@\n         [else]\n           [is changes.type \"add\"]\n             <tr>\n    -          <td id=\"l[changes.line_number]\">[if-any annotate_href]<a href=\"[annotate_href]#l[changes.line_number]\">[changes.line_number]</a>[else][changes.line_number][end]</td>\n    -          <td class=\"vc_diff_empty\">&nbsp;</td>\n    -          <td class=\"vc_diff_add\">&nbsp;[changes.right]</td>\n    +          <td width=\"6%\" id=\"l[changes.line_number]\">[if-any annotate_href]<a href=\"[annotate_href]#l[changes.line_number]\">[changes.line_number]</a>[else][changes.line_number][end]</td>\n    +          <td width=\"47%\" class=\"vc_diff_empty\">&nbsp;</td>\n    +          <td width=\"47%\" class=\"vc_diff_add\"><div class=\"vc_diff_add\">&nbsp;[changes.right]</div></td>\n             </tr>\n           [else]\n             [is changes.type \"remove\"]\n               <tr>\n                 <td></td>\n    -            <td class=\"vc_diff_remove\">&nbsp;[changes.left]</td>\n    -            <td class=\"vc_diff_empty\">&nbsp;</td>\n    +            <td width=\"47%\" class=\"vc_diff_remove\"><div class=\"vc_diff_remove\">&nbsp;[changes.left]</div></td>\n    +            <td width=\"47%\" class=\"vc_diff_empty\">&nbsp;</td>\n               </tr>\n             [else]\n               [is changes.type \"change\"]\n                 <tr>\n                   [if-any changes.have_right]\n    -                <td id=\"l[changes.line_number]\">[if-any annotate_href]<a href=\"[annotate_href]#l[changes.line_number]\">[changes.line_number]</a>[else][changes.line_number][end]</td>\n    +                <td width=\"6%\" id=\"l[changes.line_number]\">[if-any annotate_href]<a href=\"[annotate_href]#l[changes.line_number]\">[changes.line_number]</a>[else][changes.line_number][end]</td>\n                   [else]\n                     <td></td>\n                   [end]\n                   [if-any changes.have_left]\n    -                <td class=\"vc_diff_change\">&nbsp;[changes.left]</td>\n    +                <td width=\"47%\" class=\"vc_diff_change\"><div class=\"vc_diff_change\">&nbsp;[changes.left]</div></td>\n                   [else]\n    -                <td class=\"vc_diff_change_empty\">&nbsp;</td>\n    +                <td width=\"47%\" class=\"vc_diff_change_empty\">&nbsp;</td>\n                   [end]\n                   [if-any changes.have_right]\n    -                <td class=\"vc_diff_change\">&nbsp;[changes.right]</td>\n    +                <td width=\"47%\" class=\"vc_diff_change\"><div class=\"vc_diff_change\">&nbsp;[changes.right]</div></td>\n                   [else]\n    -                <td class=\"vc_diff_change_empty\">&nbsp;</td>\n    +                <td width=\"47%\" class=\"vc_diff_change_empty\">&nbsp;</td>\n                   [end]\n                 </tr>\n               [else]\n    @@ -107,9 +107,9 @@\n                       </tr>\n                     [else]\n                       <tr>\n    -                    <td id=\"l[changes.line_number]\">[if-any annotate_href]<a href=\"[annotate_href]#l[changes.line_number]\">[changes.line_number]</a>[else][changes.line_number][end]</td>\n    -                    <td class=\"vc_diff_nochange\">&nbsp;[changes.left]</td>\n    -                    <td class=\"vc_diff_nochange\">&nbsp;[changes.right]</td>\n    +                    <td width=\"6%\" id=\"l[changes.line_number]\">[if-any annotate_href]<a href=\"[annotate_href]#l[changes.line_number]\">[changes.line_number]</a>[else][changes.line_number][end]</td>\n    +                    <td width=\"47%\" class=\"vc_diff_nochange\"><div class=\"vc_diff_nochange\">&nbsp;[changes.left]</div></td>\n    +                    <td width=\"47%\" class=\"vc_diff_nochange\"><div class=\"vc_diff_nochange\">&nbsp;[changes.right]</div></td>\n                       </tr>\n                     [end]\n                   [end]\n    \n\n\n### loginfo-handler.patch - Patch against loginfo-handler from viewvc 1.0.3\n_Posted 2006-10-26 16:41:53 by grimm26_\n\n    Index: loginfo-handler\r\n    ===================================================================\r\n    --- loginfo-handler     (.../vendor/bin/loginfo-handler)        (revision 24)\r\n    +++ loginfo-handler     (.../trunk/bin/loginfo-handler) (revision 24)\r\n    @@ -235,38 +235,64 @@\r\n         debug('Repository name is \"%s\"' % repository)\r\n    \r\n         ## parse arguments\r\n    -    if len(sys.argv) > 1:\r\n    -        # the first argument should contain file version information\r\n    -        arg = sys.argv[1]\r\n    -    else:\r\n    -        # if there are no arguments, read version information from first line\r\n    -        # of input like old versions of viewcvs\r\n    -        arg = string.rstrip(sys.stdin.readline())\r\n    +    # Then we are likely using new cvs loginfo format greater than 1.12.9\r\n    +    # use loginfo format: ALL <path>bin/loginfo-handler %p %{sVv}\r\n    +    if len(sys.argv) > 3:\r\n    +       i = 2\r\n    +       files = []\r\n    \r\n    -    if len(sys.argv) > 2:\r\n    -        # if there is a second argument it indicates which parser should be\r\n    -        # used to interpret the version information\r\n    -        if sys.argv[2] == 'cvs':\r\n    -          fun = HeuristicArgParse\r\n    -        elif sys.argv[2] == 'cvsnt':\r\n    -          fun = CvsNtArgParse\r\n    -        else:\r\n    -          error('Bad arguments')\r\n    +       debug(sys.argv)\r\n    +       debug(len(sys.argv))\r\n    +\r\n    +       directory = sys.argv[1]\r\n    +       if sys.argv[2] == '- New directory':\r\n    +         directory = None\r\n    +         files = None\r\n    +       elif sys.argv[2] == '- Imported sources':\r\n    +         directory = None\r\n    +         files = None\r\n    +       else:\r\n    +         sizeofargv = len(sys.argv)\r\n    +         while (i < sizeofargv):\r\n    +             files.append((sys.argv[i], sys.argv[i+1], sys.argv[i+2]))\r\n    +             # Because file-old-new come in threes\r\n    +             i = i + 3\r\n    +       debug('files is \"%s\"' % files)\r\n         else:\r\n    -        # if there is no second argument, guess which parser to use based\r\n    -        # on the operating system. Since CVSNT now runs on Windows and\r\n    -        # Linux, the guess isn't neccessarily correct\r\n    -        if sys.platform == \"win32\":\r\n    -          fun = CvsNtArgParse\r\n    -        else:\r\n    -          fun = HeuristicArgParse\r\n    -\r\n    -    if len(sys.argv) > 3:\r\n    -        error('Bad arguments')\r\n    \r\n    +       if len(sys.argv) > 1:\r\n    +           # the first argument should contain file version information\r\n    +           arg = sys.argv[1]\r\n    +       else:\r\n    +           # if there are no arguments, read version information from first line\r\n    +           # of input like old versions of viewcvs\r\n    +           arg = string.rstrip(sys.stdin.readline())\r\n    +\r\n    +       if len(sys.argv) > 2:\r\n    +           # if there is a second argument it indicates which parser should be\r\n    +           # used to interpret the version information\r\n    +           if sys.argv[2] == 'cvs':\r\n    +             fun = HeuristicArgParse\r\n    +           elif sys.argv[2] == 'cvsnt':\r\n    +             fun = CvsNtArgParse\r\n    +           else:\r\n    +             error('Bad arguments')\r\n    +       else:\r\n    +           # if there is no second argument, guess which parser to use based\r\n    +           # on the operating system. Since CVSNT now runs on Windows and\r\n    +           # Linux, the guess isn't neccessarily correct\r\n    +           if sys.platform == \"win32\":\r\n    +             fun = CvsNtArgParse\r\n    +           else:\r\n    +             fun = HeuristicArgParse\r\n    +\r\n    +       directory, files = fun(arg, repository)\r\n         repository = cvsdb.CleanRepository(repository)\r\n    -    directory, files = fun(arg, repository)\r\n    \r\n    +    debug(repository)\r\n    +    debug(directory)\r\n    +    debug(files)\r\n    +\r\n         if files is None:\r\n           debug('Not a checkin, nothing to do')\r\n         else:\r\n    \n\n\n\n\n"}}
{"actor":{"display_login":"cmpilato"}}