Configure SVN to use DiffMerge in MAC OS X

Source: Internet
Author: User

Record several scripts for later viewing

Diff-wrap.py:

#! /Usr/bin/env python

Import sys

Import OS

# Configure your favorite three-way diff program here.

DIFF3 = "/Applications/DiffMerge. app/Contents/MacOS/DiffMerge"

# Subversion provides the paths we need as the last three parameters.

LABEL_LEFT = sys. argv [-5]

LABEL_RIGHT = sys. argv [-3]

FILE_LEFT = sys. argv [-2]

FILE_RIGHT = sys. argv [-1]

# Call the three-way diff command (change the following line to make

# Sense for your three-way diff program ).

Cmd = [DIFF3, '-- nosplash', '-t1', LABEL_LEFT,'-t2', LABEL_RIGHT, FILE_LEFT, FILE_RIGHT]

OS .exe cv (cmd [0], cmd)

Diff3-wrap.py:

#! /Usr/bin/env python

Import sys

Import OS

# Configure your favorite three-way diff program here.

DIFF3 = "/Applications/DiffMerge. app/Contents/MacOS/DiffMerge"

# Subversion provides the paths we need as the last three parameters.

LABEL_MINE = sys. argv [-8]

LABEL_OLDER = sys. argv [-6]

LABEL_YOURS = sys. argv [-4]

FILE_MINE = sys. argv [-3]

FILE_OLDER = sys. argv [-2]

FILE_YOURS = sys. argv [-1]

# Call the three-way diff command (change the following line to make

# Sense for your three-way diff program ).

Cmd = [DIFF3, '-- nosplash', '-t1', LABEL_MINE,'-t2', LABEL_OLDER, '-t3', LABEL_YOURS, FILE_MINE, FILE_OLDER, FILE_YOURS]

OS .exe cv (cmd [0], cmd)

Merge-wrap.py:

#! /Usr/bin/env python

Import sys

Import OS

# Configure your favorite three-way diff program here.

DIFF3 = "/Applications/DiffMerge. app/Contents/MacOS/DiffMerge"

# Subversion provides the paths we need as the last three parameters.

FILE_BASE = sys. argv [1]

FILE_THEIRS = sys. argv [2]

FILE_MINE = sys. argv [3]

FILE_MERGED = sys. argv [4]

FILE_WCPATH = sys. argv [5]

# Call the three-way diff command (change the following line to make

# Sense for your three-way diff program ).

Cmd = [DIFF3, '-- nosplash', '-m','-t1', 'Incoming Merge changes', '-t2', 'original (merged )', '-t3', 'current Working Copy changes', '-R', FILE_MERGED, FILE_THEIRS, FILE_BASE, FILE_MINE]

OS .exe cv (cmd [0], cmd)

. Subversion/config (under [helpers ):

Diff-cmd =/full-path-to-script-dir/bash-scripts/diff-wrap.py

Diff3-cmd =/full-path-to-script-dir/bash-scripts/diff3-wrap.py

Diff3-has-program-arg = yes

Merge-tool-cmd =/full-path-to-script-dir/bash-scripts/merge-wrap.py


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.