Skip to content
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

Add options which allows us to use difft as Apache Subversion's external diff tool #562

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

futatuki
Copy link

svn, Apache Subversion's command line client also has option to use external diff tool for svn diff subcommand. However it assumes that diff tool has diff compatible -L (label) and -u option.

This implements -L and -u options.

@Wilfred
Copy link
Owner

Wilfred commented Aug 26, 2023

Neat, it'd be nice to have svn support.

I'm OK with adding label options, but I don't like having multiple ways of setting the display mode.

Could we support this syntax similar to git support? If it's always the same arguments in the same order, we could allow those arguments without allowing -u in all circumstances.

@futatuki
Copy link
Author

Thank you for being interested in this PR.

-u option is passed only if the user does not specify any additional options. This is done by svn_io_run_diff2() C API function. In the case, -u options is always the first argument, 0 - 2 -L LABEL options is followed and then finally 2 paths, however this order is not documented.

How about hiding -u option from help and just ignore it in the argment processing ?

@bmarwell
Copy link

I'd be interested!

@bmarwell
Copy link

@futatuki can you rebase your diff, please?

@futatuki
Copy link
Author

Yes, I'm willing to do later, with pleasure.

@bmarwell
Copy link

Yes, I'm willing to do later, with pleasure.

Thanks! I am using your patch, it is really helpful. I hope @Wilfred sees this in time and can maybe integrate it :)

With this, we can use difft as a external diff for Apache Subversion,
in the form:

    svn diff --diff-cmd=difft -x '<at least one difft option>'
If "svn diff --diff-cmd" is called without -x option, svn executes
external diff command with -u option. So this allows to use
difft as external diff for Apache Subversion, without extra options.
@futatuki
Copy link
Author

Rebase done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants