Diagnosing mercurial patch rejects |
||
|
Posted by: stak Even though I've switched to using git for my day-to-day mozilla work, there are times when I have to apply patches to my mercurial tree using mq. Sometimes applying the patches fails because something changed, and it's not easy to figure out what changed, specially if the patch is large. To solve this problem, I wrote a little bash/perl script, inspect-rejects.
$ hg qpush --move try-avi applying try-avi patching file layout/base/nsRefreshDriver.cpp Hunk #1 FAILED at 936 1 out of 1 hunks FAILED -- saving rejects to file layout/base/nsRefreshDriver.cpp.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh try-avi $ inspect-rejects layout/base/nsRefreshDriver.cpp
$ inspect-rejects layout/base/nsRefreshDriver.cpp 2 files to edit # edit layout/base/nsRefreshDriver.cpp to match the expected context $ pushd layout/base && patch < nsRefreshDriver.cpp.rej && popd ~/zspace/mozilla/layout/base ~/zspace/mozilla patching file nsRefreshDriver.cpp ~/zspace/mozilla
|
|
(c) Kartikaya Gupta, 2004-2023. User comments owned by their respective posters. All rights reserved. You are accessing this website via IPv4. Consider upgrading to IPv6! |