Revision b6f3481bb456acbbb990a1045344bb06e5a40283 authored by Shawn O. Pearce on 15 July 2007, 05:40:37 UTC, committed by Shawn O. Pearce on 15 July 2007, 05:41:23 UTC
Some source material (e.g. Subversion dump files) perform directory
renames by telling us the directory was copied, then deleted in the
same revision.  This makes it difficult for a frontend to convert
such data formats to a fast-import stream, as all the frontend has
on hand is "Copy a/ to b/; Delete a/" with no details about what
files are in a/, unless the frontend also kept track of all files.

The new 'C' subcommand within a commit allows the frontend to make a
recursive copy of one path to another path within the branch, without
needing to keep track of the individual file paths.  The metadata
copy is performed in memory efficiently, but is implemented as a
copy-immediately operation, rather than copy-on-write.

With this new 'C' subcommand frontends could obviously implement an
'R' (rename) on their own as a combination of 'C' and 'D' (delete),
but since we have already offered up 'R' in the past and it is a
trivial thing to keep implemented I'm not going to deprecate it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 48b4c3d
History
File Mode Size
xdiff.h -rw-r--r-- 2.9 KB
xdiffi.c -rw-r--r-- 14.5 KB
xdiffi.h -rw-r--r-- 1.8 KB
xemit.c -rw-r--r-- 5.1 KB
xemit.h -rw-r--r-- 1.1 KB
xinclude.h -rw-r--r-- 1.2 KB
xmacros.h -rw-r--r-- 1.9 KB
xmerge.c -rw-r--r-- 10.5 KB
xprepare.c -rw-r--r-- 10.7 KB
xprepare.h -rw-r--r-- 1.1 KB
xtypes.h -rw-r--r-- 1.6 KB
xutils.c -rw-r--r-- 7.6 KB
xutils.h -rw-r--r-- 1.7 KB

back to top