Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating patches in Mercurial

Tags:

mercurial

I've looked for that in the manual, but I can't generate a patch for the last commit. I tried

hg qnew patch_name 

but it does only file with

# HG changeset patch # Parent a6a8e225d16ff5970a8926ee8d24272a1c099f9c 

I also tried

hg export tip 

but it doesn't do anything. I committed the changes exactly.

How to generate a patch file with the last commit in?

like image 830
deem Avatar asked Oct 23 '11 14:10

deem


People also ask

What is Patch in mercurial?

Patch fileThese files are also called diffs, as they were traditionally generated by the 'diff' program. While there are many different formats for patch files, the most common is the unified diff format. Mercurial can generate patch files in the unified diff format with the hg diff command.


1 Answers

The command to do this is export:

$ hg export -o FILE -r REV 

It doesn't require redirection and will thus work correctly on any platform/shell.

like image 101
Idan K Avatar answered Sep 20 '22 06:09

Idan K