ftilmann / latexdiff

Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors
GNU General Public License v3.0
517 stars 73 forks source link

Flatten and latexdiff-vc #27

Closed diego898 closed 9 years ago

diego898 commented 9 years ago

Hello,

I am trying to use latexdiff-vc to compare changes across multiple files which are included in one main project file. I currently have all of this in a git repository. When I run:

➜  MyProjectFolder git:(master) ✗ latexdiff-vc --flatten -r mymailfile.tex
Guess you are using GIT ...
Working on  mymailfile.tex
Checking out old dir into: /var/folders/mh/f311201s7p1dvk5sp293lmh40000gn/T/c3hfjP6NQt/latexdiff-vc- (rev: )
usage: git archive [options] <tree-ish> [<path>...]
   or: git archive --list
   or: git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]
   or: git archive --remote <repo> [--exec <cmd>] --list

    --format <fmt>        archive format
    --prefix <prefix>     prepend prefix to each pathname in the archive
    -o, --output <file>   write the archive to this file
    --worktree-attributes
                          read .gitattributes in working directory
    -v, --verbose         report archived files on stderr
    -0                    store only
    -1                    compress faster
    -9                    compress better

    -l, --list            list supported archive formats

    --remote <repo>       retrieve the archive from remote repository <repo>
    --exec <command>      path to the remote git-upload-archive command

Running latexdiff
Input file /var/folders/mh/f311201s7p1dvk5sp293lmh40000gn/T/c3hfjP6NQt/latexdiff-vc-/mymailfile.tex does not exist. at /usr/texbin/latexdiff line 1008, <DATA> line 24764.
Something went wrong in latexdiff. Deleting mymailfile.tex-diff.tex and abort

I dont understand that strange error message about the file not existing? Notice the strange . between exist and at?

As it says on the docs on CTAN:

The generic usage of this function is : latexdiff-vc --flatten -r rev1
[-r rev2] master.tex where master.tex is the project file containing the
highest level of includes etc.
ftilmann commented 9 years ago

Can you try whether latexdiff-vc --flatten -r HEAD mymailfile.tex works and let me know? The form you have chosen is supposed to work as an abbreviation for this, but as I have no git repository with latex files ready to check out, it would help if you could perform this check. The . between exist and at is trivial - the part beyond 'at' is generated by Perl's die command, and the part before the specific message (for good measure I fixed this for future reference). But this message is just the symptom of the failure of the git command beforehand.

diego898 commented 9 years ago

Hello! Yes latexdiff-vc --flatten -r HEAD mymailfile.tex works perfectly.

ftilmann commented 9 years ago

Thanks. That was an easy fix d9db4cb