]> Cypherpunks repositories - gostls13.git/commit
codereview: automatically port old diffs forward
authorRuss Cox <rsc@golang.org>
Fri, 8 Apr 2011 17:00:40 +0000 (13:00 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 8 Apr 2011 17:00:40 +0000 (13:00 -0400)
commit740051ae75e9a97ae86b9ff2374477e84b5972ed
tree70340d84e7b8f009d215e3eec2e8bffb05a30c40
parentddd0fa17446aa510dd48df7fd07ccce9a9b156d0
codereview: automatically port old diffs forward

In the current codereview, if a patch was written against
a version of a file that had subsequently been edited,
hg clpatch would fail, even if the patch and the edits were
in different parts of the file.  In this situation the reviewer
typically wrote back saying "please hg sync and hg mail
to update the patch".

This change rewrites the patch automatically, using the
same transformation that hg sync + hg mail would.

If the interim changes (since the patch was created)
affect the same line ranges as the patch, clpatch will
still refuse to apply it.  But this CL should make
of the trivial conflicts we see just go away.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4377046
lib/codereview/codereview.py