Hello community, here is the log from the commit of package vim checked in at Fri Aug 31 16:04:22 CEST 2007. -------- --- vim/vim.changes 2007-08-22 16:10:28.000000000 +0200 +++ /mounts/work_src_done/STABLE/vim/vim.changes 2007-08-31 12:38:48.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Aug 31 12:37:39 CEST 2007 - mkoenig@suse.de + +- let vim detect a failing diff [#252901] +- add /bin/ex symlink [#306423] + +------------------------------------------------------------------- New: ---- vim-7.1-diff_check.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vim.spec ++++++ --- /var/tmp/diff_new_pack.n25471/_old 2007-08-31 16:03:53.000000000 +0200 +++ /var/tmp/diff_new_pack.n25471/_new 2007-08-31 16:03:53.000000000 +0200 @@ -12,7 +12,7 @@ Name: vim Version: 7.1 -Release: 30 +Release: 36 # License: Other uncritical OpenSource License, http://vimdoc.sourceforge.net/htmldoc/uganda.html#license Group: Productivity/Editors/Vi @@ -83,6 +83,7 @@ Patch16: %{name}-7.0-flex-array.diff Patch17: vim-7.1-ftplugin_changelog.patch Patch18: vim-7.1-syntax_spec.patch +Patch19: vim-7.1-diff_check.patch # tbd??? %name-6.3-ga-utf8.diff # tbd??? %name-6.3-initvals.diff # tbd??? vim64-svn-crash.patch @@ -280,6 +281,7 @@ %patch16 %patch17 -p1 %patch18 +%patch19 -p1 %patch100 -p0 cp %{S:3} %{S:4} %{S:5} %{S:6} %{S:8} %{S:9} %{S:10} . rename no nb $RPM_BUILD_DIR/vim*/src/po/no.* @@ -375,6 +377,7 @@ %{__ln_s} -f /bin/vim %{buildroot}%{_bindir}/vim %{__ln_s} -f /bin/vim %{buildroot}%{_bindir}/vi %{__ln_s} -f vim %{buildroot}%{_bindir}/edit +%{__ln_s} -f /bin/vim %{buildroot}/bin/ex # # man pages %{__ln_s} -f vim.1.gz %{buildroot}%{_mandir}/man1/vi.1.gz @@ -489,6 +492,7 @@ # symlinks /bin/vi /bin/vim +/bin/ex %{_bindir}/edit %{_bindir}/ex %{_bindir}/rview @@ -633,6 +637,9 @@ %endif %changelog +* Fri Aug 31 2007 - mkoenig@suse.de +- let vim detect a failing diff [#252901] +- add /bin/ex symlink [#306423] * Wed Aug 22 2007 - mkoenig@suse.de - really enable syntax highlighting [#274600] - update apparmor syntax rules [#301605] ++++++ vim-7.1-diff_check.patch ++++++ Index: vim71/src/diff.c =================================================================== --- vim71.orig/src/diff.c +++ vim71/src/diff.c @@ -42,7 +42,7 @@ static void diff_check_unchanged __ARGS( static int diff_check_sanity __ARGS((tabpage_T *tp, diff_T *dp)); static void diff_redraw __ARGS((int dofold)); static int diff_write __ARGS((buf_T *buf, char_u *fname)); -static void diff_file __ARGS((char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff)); +static int diff_file __ARGS((char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff)); static int diff_equal_entry __ARGS((diff_T *dp, int idx1, int idx2)); static int diff_cmp __ARGS((char_u *s1, char_u *s2)); #ifdef FEAT_FOLDING @@ -661,6 +661,7 @@ ex_diffupdate(eap) char_u *tmp_diff; FILE *fd; int ok; + int retval; /* Delete all diffblocks. */ diff_clear(curtab); @@ -706,7 +707,7 @@ ex_diffupdate(eap) { fwrite("line2\n", (size_t)6, (size_t)1, fd); fclose(fd); - diff_file(tmp_orig, tmp_new, tmp_diff); + retval = diff_file(tmp_orig, tmp_new, tmp_diff); fd = mch_fopen((char *)tmp_diff, "r"); if (fd != NULL) { @@ -750,6 +751,12 @@ ex_diffupdate(eap) } #endif + /* diff returned an error */ + if (retval == 2) { + ok = FALSE; + break; + } + /* If we checked if "-a" works already, break here. */ if (diff_a_works != MAYBE) break; @@ -782,10 +789,13 @@ ex_diffupdate(eap) continue; if (diff_write(buf, tmp_new) == FAIL) continue; - diff_file(tmp_orig, tmp_new, tmp_diff); - - /* Read the diff output and add each entry to the diff list. */ - diff_read(idx_orig, idx_new, tmp_diff); + retval = diff_file(tmp_orig, tmp_new, tmp_diff); + if (retval == 2) + EMSG(_("E97: Cannot create diffs")); + else { + /* Read the diff output and add each entry to the diff list. */ + diff_read(idx_orig, idx_new, tmp_diff); + } mch_remove(tmp_diff); mch_remove(tmp_new); } @@ -802,13 +812,14 @@ theend: /* * Make a diff between files "tmp_orig" and "tmp_new", results in "tmp_diff". */ - static void + static int diff_file(tmp_orig, tmp_new, tmp_diff) char_u *tmp_orig; char_u *tmp_new; char_u *tmp_diff; { char_u *cmd; + int retval; #ifdef FEAT_EVAL if (*p_dex != NUL) @@ -842,13 +853,14 @@ diff_file(tmp_orig, tmp_new, tmp_diff) #ifdef FEAT_AUTOCMD ++autocmd_block; /* Avoid ShellCmdPost stuff */ #endif - (void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT); + retval = call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT); #ifdef FEAT_AUTOCMD --autocmd_block; #endif vim_free(cmd); } } + return retval; } /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de