views:

36

answers:

1

I have a LaTeX hg repository for a paper and I use hg serve to display the progress to my coauthors. Until last week the file paper.pdf was treated as binary and its contents were not displayed in the changesets. (The users could download it via the raw link)

Since last week, paper.pdf is treated as text and I see huge diffs of PDF code in my changesets...

Is there a way to tell the repository to treat this file as binary instead of "guessing" ?

On my server (where hg serve runs):
hg --version --> Mercurial Distributed SCM (version 1.0.1)
on my laptop:
hg --version --> Mercurial Distributed SCM (version 1.3.1)

+1  A: 

You can't override the heuristic (which is quite simple, it just checks for the presence of a NUL byte in the data).

I guess the generated PDF isn't compressed which means it is just plain text, and it doesn't contain any NUL byte.

But why is it important for you to have it as binary?

tonfa
Let me just add, that regardless of what `hg diff` shows you, Mercurial will use a binary diff format internally.
Martin Geisler
I am looking into ways to get a NULL byte somewherein the PDF file...I tried this: \usepackage[pdftex]{graphics} \pdfcompresslevel=9but it seems I wasn't lucky enough to get a NULL in the pdf.I will add some more high-res pictures ;)And one day when I submit I will look at the `hg serve` source code...
ivan