Closed Bug 1541190 Opened 6 years ago Closed 6 years ago

Use `patch` backend to apply patches when `hg import`'s internal patcher fails

Categories

(Conduit Graveyard :: Transplant, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smacleod, Assigned: glob)

References

Details

(Keywords: conduit-triaged)

Attachments

(6 files)

Mercurial's built in patcher for hg import can have bugs and fail to apply patches that patch or git apply would successfully (See Bug Bug 1541181). We should first attempt to apply the patch using the built-in patcher but if it fails fallback to the patch utility. We can tell hg import to use patch to apply the actual patches by setting ui.patch to patch. From hg help config:

    "patch"
        An optional external tool that "hg import" and some extensions will
        use for applying patches. By default Mercurial uses an internal patch
        utility. The external tool must work as the common Unix "patch"
        program. In particular, it must accept a "-p" argument to strip patch
        headers, a "-d" argument to specify the current directory, a file name
        to patch, and a patch file to take from stdin.

        It is possible to specify a patch tool together with extra arguments.
        For example, setting this option to "patch --merge" will use the
        "patch" program with its 2-way merge option.
Type: defect → enhancement
Keywords: conduit-triaged
Priority: -- → P2
Assignee: nobody → glob
Status: NEW → ASSIGNED
See Also: → 1541181

Depends on D29142

Depends on D29143

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Conduit → Conduit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: