You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Hernán Martínez Foffani <he...@ecc.es> on 2003/11/19 15:17:36 UTC

python bindings, in abscence of diff ...

Hi!

fs.FileDiff calls an external diff where comparing revisions.
It does so by mean of popen2.popen2(...)  I would suggest to
change that to os.popen3(...) and analizing that if there is
"something" in stderr, throw an exception with that content.

The rationale of this is based on the fact that in abscence
of a diff program (or when diff is not in PATH) the output
of FileDiff is an empty string.
Besides there are several diff program out there many of
them differs in their parameters options.
Those problems are difficult to solve because its sympthom
is just a "revisions are equal" output.

BTW, I found this by debugging ViewCVS.  I thought that given
that ViewCVS doesn't care of working/local copies it wouldn't
use an external diff program.  I was wrong.  Is there any
python API to get diff of commited revisions from the
server _directly_?

Regards,
-Hernan



________________________________________________________________________________________
Este mensaje ha sido analizado y protegido por la tecnologia antivirus www.trendmicro.es

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: python bindings, in abscence of diff ...

Posted by Barry Scott <ba...@barrys-emacs.org>.
I use client_cat and diff using my own diff tools.

The cat bug will not effect you as you always want
revisions from the repository. (The cat bug affects
getting the text of -r BASE).

Barry

At 19-11-2003 15:17, Hernán Martínez Foffani wrote:

>Hi!
>
>fs.FileDiff calls an external diff where comparing revisions.
>It does so by mean of popen2.popen2(...)  I would suggest to
>change that to os.popen3(...) and analizing that if there is
>"something" in stderr, throw an exception with that content.
>
>The rationale of this is based on the fact that in abscence
>of a diff program (or when diff is not in PATH) the output
>of FileDiff is an empty string.
>Besides there are several diff program out there many of
>them differs in their parameters options.
>Those problems are difficult to solve because its sympthom
>is just a "revisions are equal" output.
>
>BTW, I found this by debugging ViewCVS.  I thought that given
>that ViewCVS doesn't care of working/local copies it wouldn't
>use an external diff program.  I was wrong.  Is there any
>python API to get diff of commited revisions from the
>server _directly_?
>
>Regards,
>-Hernan
>
>
>
>________________________________________________________________________________________
>Este mensaje ha sido analizado y protegido por la tecnologia antivirus 
>www.trendmicro.es
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: python bindings, in abscence of diff ...

Posted by "C. Michael Pilato" <cm...@collab.net>.
Hernán Martínez Foffani <he...@ecc.es> writes:

> BTW, I found this by debugging ViewCVS.  I thought that given that
> ViewCVS doesn't care of working/local copies it wouldn't use an
> external diff program.  I was wrong.  Is there any python API to get
> diff of commited revisions from the server _directly_?

We have an internal diff library which someday we hope to use for
this, but ViewCVS wants multi-various diff display modes (context,
unidiff, side-by-side, etc.), and our internal diff library has but
one (unidiff).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org