-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hg option not working #93
Comments
The first problem was a silly omission, which should now be fixed. The second issue looks slightly more complicated. I have to confess to be almost completely unfamiliar with hg - this functionality was contributed by @junghans back in 2015, and it seemed to work for him but I never actually tested it myself. The only way to realistically reproduce your bug report and eventually fix the problem would be if you could prepare a tar package of the directory where this error occurs (ideally reduced to an MWE) including the hidden .hg subdirectory, and the exact sequence of commands that produces the error. |
Thanks for the quick fix! I know hg is the most common so I’m gratefull that you look into it.
Anyway, the second issue occurs when you have a subfolder and run latexdiff-vc in the subfolder.
MWE:
- create repo
- create file text.tex (with some latex content)
- create folder test
- create file testsub.tex (with some latex content)
- commit
- change the two files and run the code as shown below (replace 54... by your revision number)
First run
latexdiff-vc —hg -r 54a65557bc70 test.tex
This results in:
Working on test.tex
patching file test.tex
Running: latexdiff "test-oldtmp-28354.tex" "test.tex" > "test-diff54a65557bc70.tex"
Generated difference file test-diff54a65557bc70.tex
Change the folder end retry with testsub.tex
cd tex
latexdiff-vc —hg -r 54a65557bc70 testsub.tex
This results in:
Working on testsub.tex
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -r 54a65557bc70 tex/testsub.tex
|--- a/tex/testsub.tex Mon Apr 03 23:55:09 2017 +0200
|+++ b/tex/testsub.tex Mon Apr 03 23:58:02 2017 +0200
--------------------------
File to patch:
If you type: testsub.tex
you get
patching file testsub.tex
Running: latexdiff "testsub-oldtmp-28366.tex" "testsub.tex" > "testsub-diff54a65557bc70.tex"
Generated difference file testsub-diff54a65557bc70.tex
I hope this example is understandable.
Btw. the -r option without specifying a revision does not work either.
|
Hmm, I guess I never tried using
Maybe we should a test case along the lines:
|
I think it is enough to insert `tip` in this case (for hg)
latexdiff-vc —hg -r myfile.tex
should become
latexdiff-vc —hg -r tip myfile.tex
Am 04.04.2017 um 01:53 schrieb Christoph Junghans <[email protected]>:
… Hmm, I guess I never tried using -r without a revision, e.g.
latexdiff-vs -r myfile.tex
Maybe we should a test case along the lines:
for vs in git hg; do
type -p $vs || continue
$vs init xxx
cd xxx
$vs add somefile.tex
$vs commit -m "initial commit"
sed -i 's/text/text text/' somefile.tex
latexdiff-vs -r somefile.tex
done
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Works like a charm, thanks!
Am 04.04.2017 um 14:48 schrieb Christoph Junghans <[email protected]>:
…
|
@junghans thanks for this patch; I am glad this could be fixed so quickly |
The --hg option is ignored in latexdiff-vc. I used a workaround by inserting
$vc="HG";
on line 148 but there is definitely a better way.With this
fix
I also get the error messagecan't find file to patch at input line 4
that is solved by retyping the file name when prompted to.I'm running:
The text was updated successfully, but these errors were encountered: