Revision: 144 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=144&view=rev Author: yurand Date: 2008-08-31 12:01:22 +0000 (Sun, 31 Aug 2008)
Log Message: ----------- ignore unknown status lines for svn/svk
Modified Paths: -------------- trunk/geanyvc/geanyvc.c trunk/geanyvc/vc_svk.c trunk/geanyvc/vc_svn.c
Modified: trunk/geanyvc/geanyvc.c =================================================================== --- trunk/geanyvc/geanyvc.c 2008-08-27 21:34:04 UTC (rev 143) +++ trunk/geanyvc/geanyvc.c 2008-08-31 12:01:22 UTC (rev 144) @@ -650,7 +650,8 @@ vc = find_vc(geany->app->project->base_path); g_return_if_fail(vc);
- execute_command(vc, &text, NULL, geany->app->project->base_path, VC_COMMAND_DIFF_DIR, NULL, NULL); + execute_command(vc, &text, NULL, geany->app->project->base_path, VC_COMMAND_DIFF_DIR, NULL, + NULL); if (text) { name = g_strconcat(project->name, ".vc.diff", NULL); @@ -745,13 +746,14 @@ gchar *text = NULL; const VC_RECORD *vc; GeanyProject *project = geany->app->project; - + g_return_if_fail(project != NULL && NZV(geany->app->project->base_path));
vc = find_vc(geany->app->project->base_path); g_return_if_fail(vc);
- execute_command(vc, &text, NULL, geany->app->project->base_path, VC_COMMAND_LOG_DIR, NULL, NULL); + execute_command(vc, &text, NULL, geany->app->project->base_path, VC_COMMAND_LOG_DIR, NULL, + NULL); if (text) { show_output(text, "*VC-LOG*", NULL); @@ -1413,7 +1415,7 @@ { GeanyDocument *doc; GeanyProject *project = geany->app->project; - + gboolean have_file; gboolean p_have_vc = FALSE; gboolean d_have_vc = FALSE; @@ -1784,8 +1786,9 @@ GtkWidget *menu_vc_menu = NULL; GtkTooltips *tooltips = NULL;
- config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, - "VC", G_DIR_SEPARATOR_S, "VC.conf", NULL); + config_file = + g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, + "VC", G_DIR_SEPARATOR_S, "VC.conf", NULL);
load_config(); registrate();
Modified: trunk/geanyvc/vc_svk.c =================================================================== --- trunk/geanyvc/vc_svk.c 2008-08-27 21:34:04 UTC (rev 143) +++ trunk/geanyvc/vc_svk.c 2008-08-31 12:01:22 UTC (rev 144) @@ -132,6 +132,7 @@ } else if (pstatus == FIRST_CHAR) { + status = NULL; if (*p == '?') status = FILE_STATUS_UNKNOWN; else if (*p == 'M') @@ -140,6 +141,22 @@ status = FILE_STATUS_DELETED; else if (*p == 'A') status = FILE_STATUS_ADDED; + + if (!status || *(p + 1) != ' ') + { + // skip unknown status line + while (*p) + { + p++; + if (*p == '\n') + { + p++; + break; + } + } + pstatus = FIRST_CHAR; + continue; + } pstatus = SKIP_SPACE; } else if (pstatus == SKIP_SPACE)
Modified: trunk/geanyvc/vc_svn.c =================================================================== --- trunk/geanyvc/vc_svn.c 2008-08-27 21:34:04 UTC (rev 143) +++ trunk/geanyvc/vc_svn.c 2008-08-31 12:01:22 UTC (rev 144) @@ -128,6 +128,7 @@ } else if (pstatus == FIRST_CHAR) { + status = NULL; if (*p == '?') status = FILE_STATUS_UNKNOWN; else if (*p == 'M') @@ -136,6 +137,22 @@ status = FILE_STATUS_DELETED; else if (*p == 'A') status = FILE_STATUS_ADDED; + + if (!status || *(p + 1) != ' ') + { + // skip unknown status line + while (*p) + { + p++; + if (*p == '\n') + { + p++; + break; + } + } + pstatus = FIRST_CHAR; + continue; + } pstatus = SKIP_SPACE; } else if (pstatus == SKIP_SPACE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org