git/vcs-svn
Jonathan Nieder 08c39b5c44 vcs-svn: Combine repo_replace and repo_modify functions
There are two functions to change the staged content for a path in the
svn importer's active commit: repo_replace, which changes the text and
returns the mode, and repo_modify, which changes the text and mode and
returns nothing.

Worse, there are more subtle differences:

 - A mark of 0 passed to repo_modify means "use the existing content".
   repo_replace uses it as mark :0 and produces a corrupt stream.

 - When passed a path that is not part of the active commit,
   repo_replace returns without doing anything.  repo_modify
   transparently adds a new directory entry.

Get rid of both and introduce a new function with the best features of
both: repo_modify_path modifies the mode, content, or both for a path,
depending on which arguments are zero.  If no such dirent already
exists, it does nothing and reports the error by returning 0.
Otherwise, the return value is the resulting mode.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-24 14:51:43 -08:00
..
fast_export.c vcs-svn: Fix some printf format compiler warnings 2010-09-12 10:24:55 -07:00
fast_export.h Infrastructure to write revisions in fast-export format 2010-08-14 19:35:37 -07:00
LICENSE SVN dump parser 2010-08-14 19:35:38 -07:00
line_buffer.c Add stream helper library 2010-08-14 19:35:37 -07:00
line_buffer.h Add stream helper library 2010-08-14 19:35:37 -07:00
line_buffer.txt Add stream helper library 2010-08-14 19:35:37 -07:00
obj_pool.h Add memory pool library 2010-08-14 19:35:37 -07:00
repo_tree.c vcs-svn: Combine repo_replace and repo_modify functions 2010-11-24 14:51:43 -08:00
repo_tree.h vcs-svn: Combine repo_replace and repo_modify functions 2010-11-24 14:51:43 -08:00
string_pool.c Add string-specific memory pool 2010-08-14 19:35:37 -07:00
string_pool.h Add string-specific memory pool 2010-08-14 19:35:37 -07:00
string_pool.txt Add string-specific memory pool 2010-08-14 19:35:37 -07:00
svndump.c vcs-svn: Combine repo_replace and repo_modify functions 2010-11-24 14:51:43 -08:00
svndump.h vcs-svn: Check for errors from open() 2010-11-24 14:51:42 -08:00
trp.h treap: style fix 2010-08-14 19:35:38 -07:00
trp.txt Add treap implementation 2010-08-14 19:35:37 -07:00