"svn mv" and changing files at the same time: still prohibited
bdrewery at FreeBSD.org
Tue Jun 18 12:22:43 UTC 2013
On 6/17/2013 9:18 AM, Alexey Dokuchaev wrote:
> Hi there,
> I've been trying to rename a port (games/rtcw -> games/linux-rtcw) and had
> to change something inside port's Makefile at the same time (drop PORTEPOCH
> and PORTREVISION, and set PKGNAMEPREFIX accordingly), but commit was blocked
> by pre-commit hook with "Do not replace a file. This can lose history."
> message. I was under impression that this is only true for CVS exporter,
> but since we no longer doing this, this hook should be removed.
We've kept this to avoid losing easily-traceable history.
The intent of this hook is to prevent a 'svn rm' and 'svn add' in the
same commit where someone's intent was to 'undo' the removal. IIUC this
would make 'svn log' on the file stop and require 'svn log file at old-rev'
> I've renamed and edited pkg-message file of that port just fine (in the
> previous revision), and all history is there, so I'm wondering what's so
> special about doing the same at the port-name level.
The issue is likely that the source you copied from was not fully
up-to-date. I've seen 2 cases of this recently. Example situation:
You committed an update in rtcw to Makefile. The directory was at
revision X, the commit brought Makefile to Y.
You then 'svn mv' rtcw to linux-rtcw, which copies X (dir) and Y
(files). Separate revisions. The change to the Y files then is seen as a
"replacement" by the python SVN API.
Solution: Save your target changes, undo the move (revert rtcw), 'svn
update' in rtcw, and mv again. Then copy in your changes and commit.
Don't forget to 'svn add' any files as well.
This should fix it.
The hook is not intended to stop the situation you ran into. I do plan
to look at it more and test on a local repository to find a solution.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 899 bytes
Desc: OpenPGP digital signature
More information about the freebsd-ports