Bruce Tulloch | 5 Oct 06:13 2010

dvc-diff fails on html files

DVC appears to have been broken by a recent Debian/Squeeze update.

When performing dvc-diff or dvc-diff-ediff on a modified HTML file
emacs reports the following error:

  byte-code: Wrong type argument: stringp, nil

If the file is any other type (i.e. not HTML) it appears to be OK.

I'm using the xhg backend and html files are opened with psgml.

It looks like some sort of interaction with psgml mode. The value of
psgml-html-build-new-buffer does not matter. Any clues or advice as to
how I can debug this or provide any more feedback is welcome. Needless
to say I'm not an elisp guru :-)

I am running DVC built from source and packaged for debian as:

Package: dvc
Version: 0r20100420-1
Severity: normal

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
(Continue reading)

Bruce Tulloch | 5 Oct 07:34 2010

Re: dvc-diff fails on html files

Ok, I think I've sorted the problem for now; when dvc opens an html file
it requires the sb-html library which is part of the speedbar package
(in squeeze, I think it was in emacs21 in lenny). The speedbar package
was not installed on my system and nothing pulled it in as a dependency.
I've not investigated why dvc wants sb-html (find-file does not require
it to open html files for example) but my fix for now is just to install
speedbar.

Does DVC actually depend on speedbar? If so, I guess the debian package
dependencies will need to be updated.

Speaking of debian packaging, DVC does not build correctly on a squeeze
system (I built DVC on lenny). I'll look into this further.

Cheers, Bruce.

On 10/05/10 15:13, Bruce Tulloch wrote:
> DVC appears to have been broken by a recent Debian/Squeeze update.
>
> When performing dvc-diff or dvc-diff-ediff on a modified HTML file
> emacs reports the following error:
>
>   byte-code: Wrong type argument: stringp, nil
>
> If the file is any other type (i.e. not HTML) it appears to be OK.
>
> I'm using the xhg backend and html files are opened with psgml.
>
> It looks like some sort of interaction with psgml mode. The value of
> psgml-html-build-new-buffer does not matter. Any clues or advice as to
(Continue reading)

Stefan Reichör | 5 Oct 08:06 2010
Picon

Re: dvc-diff fails on html files

Hi Bruce!

> Ok, I think I've sorted the problem for now; when dvc opens an html file
> it requires the sb-html library which is part of the speedbar package
> (in squeeze, I think it was in emacs21 in lenny). The speedbar package
> was not installed on my system and nothing pulled it in as a dependency.
> I've not investigated why dvc wants sb-html (find-file does not require
> it to open html files for example) but my fix for now is just to install
> speedbar.
>
> Does DVC actually depend on speedbar? If so, I guess the debian package
> dependencies will need to be updated.

No dvc does not depend on speedbar.

> Speaking of debian packaging, DVC does not build correctly on a squeeze
> system (I built DVC on lenny). I'll look into this further.
>
> Cheers, Bruce.
>
> On 10/05/10 15:13, Bruce Tulloch wrote:
>> DVC appears to have been broken by a recent Debian/Squeeze update.
>>
>> When performing dvc-diff or dvc-diff-ediff on a modified HTML file
>> emacs reports the following error:
>>
>>   byte-code: Wrong type argument: stringp, nil
>>
>> If the file is any other type (i.e. not HTML) it appears to be OK.
>>
(Continue reading)

Bruce Tulloch | 5 Oct 09:53 2010

Re: dvc-diff fails on html files

Hi Stefan,

Thanks for your work with dvc, it's a very useful tool and will be a
welcome addition to emacs one day!

On 10/05/10 17:06, Stefan Reichör wrote:
> I also guess that it has something todo with psgml mode.
> What happens when you do an M-x ediff-files with two html files?
>   
That worked OK. The problem seems to be something to do with how DVC
pulls revisions from the repository as it creates the "original" buffer.
There's a hook in psgml that uses an html template to build default html
if the buffer is being created instead of an existing file being opened.
ediff-files opens files and the problem does not occur. dvc on the other
hand creates a new buffer and then populates it with the revision pulled
from the repository. This results in psgml creating the template html
first (if psgml-html-build-new-buffer is true). This seems to need
sb-html but it also means the buffer pulled from the repository has the
template fluff in it as well unless one turns off
psgml-html-build-new-buffer (which I have done for now).

I'm moving forward using dvc successfully again (since migrating to
squeeze recently) but there are a few other niggly problems which I will
analyze and report on when I get a chance (notably:
dvc-fileinfo-remove-files does not work on files that have already been
deleted from the working directory, i.e. "!" files. This is since moving
to emacs23 in squeeze  so I'm just using "hg st -dn | xargs hg remove"
in a shell buffer for now).

Cheers, Bruce.
(Continue reading)

Bojan Nikolic | 5 Oct 10:17 2010
Picon

Re: dvc-diff fails on html files


It should be useful if you turn on back-traces for errors:

,----[ C-h f toggle-debug-on-error RET ]
| toggle-debug-on-error is an interactive compiled Lisp function in
| `menu-bar.el'.
| 
| It is bound to <menu-bar> <options> <debug-on-error>.
| 
| (toggle-debug-on-error &optional interactively)
| 
| Toggle whether to enter Lisp debugger when an error is signaled.
| In an interactive call, record this option as a candidate for saving
| by "Save Options" in Custom buffers.
`----

and post the back-trace here.

Best,
Bojan

--

-- 
Bojan Nikolic          ||          http://www.bnikolic.co.uk
Bruce Tulloch | 5 Oct 11:25 2010

Re: dvc-diff fails on html files

Thanks for the tip Bojan,

This trace (below) is produced when dvc-status produces the file list:

hg status for /home/bruce/hg/fpcfixes/

 ! INSTALL

and I run dvc-fileinfo-remove-files on the file INSTALL which has been
deleted but not (yet) removed.

Note: I have snipped the byte-code in <snip> from the trace below (as
it's unprintable):

Debugger entered--Lisp error: (setting-constant nil)
  add-to-list(nil [cl-struct-dvc-fileinfo-legacy (file "INSTALL" "!")])
  dvc-fileinfo-remove-files()
  call-interactively(dvc-fileinfo-remove-files nil nil)
  recursive-edit()
  byte-code("<snip>" [unread-command-char debugger-args x
debugger-buffer noninteractive debugger-batch-max-lines -1 debug
backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode
debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string
kill-emacs "" nil recursive-edit middlestart buffer-read-only
standard-output] 4)
  debug(error (setting-constant nil))
  add-to-list(nil [cl-struct-dvc-fileinfo-legacy (file
".emacs.d/session.1063e1dc2cfbce37e128323431859137100000226910027" "!")])
  dvc-fileinfo-remove-files()
  call-interactively(dvc-fileinfo-remove-files nil nil)
(Continue reading)

Bojan Nikolic | 5 Oct 15:48 2010
Picon

Re: dvc-diff fails on html files


The fix to the immediate problem is the following:

--- a/lisp/dvc-fileinfo.el
+++ b/lisp/dvc-fileinfo.el
 <at>  <at>  -762,7 +762,7  <at>  <at> 

             (dvc-fileinfo-legacy
              ;; Assume files are known
-             (add-to-list known-files fileinfo))
+             (add-to-list 'known-files fileinfo))

             (otherwise
              ;; just ignore

but the routine still fails later on when trying to extract data from
the cl-struct-dvc-fileinfo-legacy..... Perhaps somebody who is familiar
with this part of the code can have a look?

--

-- 
Bojan Nikolic          ||          http://www.bnikolic.co.uk
Bojan Nikolic | 5 Oct 19:56 2010
Picon

Re: dvc-diff fails on html files


Attached is the proper fix for this problem:

Attachment (deletedfileprob.patch): text/x-diff, 2415 bytes

--

-- 
Bojan Nikolic          ||          http://www.bnikolic.co.uk
_______________________________________________
Dvc-dev mailing list
Dvc-dev <at> gna.org
https://mail.gna.org/listinfo/dvc-dev
Stefan Reichör | 5 Oct 22:30 2010
Picon

[commit] rev 579: Merged fix from Bojan Nikolic to fix a problem with file removing

Committed revision 579 to http://bzr.xsteve.at/dvc/

Merged fix from Bojan Nikolic to fix a problem with file removing
deryck.hodge | 5 Oct 21:16 2010

Launchpad Bugs Re-enabling Auto Expiring Bugs


Bug expiry in Launchpad is changing
------------------------------------

The way Launchpad handles inactive bugs is changing. This affects your project
dvc at https://launchpad.net/dvc

What's going to change
-----------------------

Right now, the bug expiry option is enabled for dvc but is inactive
across all of Launchpad.

We weren't happy with the way bug expiry worked, so we turned it off. However,
now we're ready to switch it back on.

In about two weeks, we will re-enable automatic bug expiry in Launchpad.
However, we are going to deselect the bug expiry option on each project,
including dvc.

What this means for your project
--------------------------------

If you want Launchpad to automatically expire bugs that appear to be inactive,
you need to select the 'Expire "Incomplete" bug reports when they become
inactive' option on this page:

https://bugs.launchpad.net/dvc/+configure-bugtracker

For more detail on how Launchpad determines if a bug is inactive, visit our
(Continue reading)


Gmane