On Sun, Mar 12, 2006 at 11:27:23PM +0000, Julian Foad wrote:
> Any comments before I commit this?
>
+1, makes sense.
> +#----------------------------------------------------------------------
> +# A base->repos diff of a moved file used to output an all-lines-deleted diff
> +def diff_base_repos_moved(sbox):
> + "base->repos diff of moved file"
> +
> + sbox.build()
> +
> + current_dir = os.getcwd()
> + os.chdir(sbox.wc_dir)
> + try:
> + oldfile = 'iota'
> + newfile = 'kappa'
> +
> + # Move, modify and commit a file
> + svntest.main.run_svn(None, 'mv', oldfile, newfile)
> + open(newfile, 'w').write("new content\n")
> + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', '')
> +
> + # Check that a base->repos diff shows deleted and added lines.
> + # It's not clear whether we expect a file-change diff or
> + # a file-delete plus file-add. The former is currently produced if we
> + # explicitly request a diff of the file itself, and the latter if we
> + # request a tree diff which just happens to contain the file.
That's correct. When you select the file itself, you're asking for a
diff between the file as it exists in BASE (called 'kappa') and the same
file traced back to r1 (then called 'iota'). So that's a file-change.
However, when you select the directory, you're asking for the changes
between BASE and r1 of the directory. If diff supports copyfrom (and I
can't remember whether it does in this specific case), we should see a
file-change for 'kappa' as above, plus a file-add for 'iota'. If not,
we should see a file-delete for 'kappa' and a file-add for 'iota'.
We should also be able to verify that 'svn diff -r1:BASE' gives the
opposite diff.
Regards,
Malcolm
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 13 10:09:28 2006