NOTE: This patch has been committed. The version below is
informational only (whitespace differences have been removed).
ChangeLog addition:
2004-09-15 Didier Verna <didier(a)lrde.epita.fr>
* prcs2svn/prcs2svn.py (Informations.keep_deleted_files): New.
* prcs2svn/prcs2svn.py (Main): New corresponding command-line
option: "keep-deleted-files".
* prcs2svn/prcs2svn.py (Prcs2svn.merge): Handle it.
lrde-tools source patch:
Diff command: svn diff --diff-cmd /usr/bin/diff -x "-u -t -b -B -w"
Files affected: prcs2svn/prcs2svn.py
Index: prcs2svn/prcs2svn.py
===================================================================
--- prcs2svn/prcs2svn.py (revision 95)
+++ prcs2svn/prcs2svn.py (working copy)
@@ -213,6 +213,9 @@
# Where to write in svn project
subdir = ""
+ # Delete files after a merge
+ keep_deleted_files = False
+
infos = Informations()
# Keywords.
@@ -978,6 +981,7 @@
prcsProject.prj_parser.parse(prcsProject.name + ".prj"),
prcs_merge_parent[2:])
diffs = prcs.diff(prcsProject.prev_prj, prcsProject.prj)
+ if not infos.keep_deleted_files:
# Fix tc's bug
if prcs_merge_parent != prcsProject.prj.merge_parents[-1]:
self.svn.changes_apply_files_directories_delete(diffs)
@@ -1180,6 +1184,8 @@
infos.copy_prcs = True
if o == "--copy-svn":
infos.copy_svn = True
+ if o == "--keep-deleted-files":
+ infos.keep_deleted_files = True
if o == "--svn-root":
infos.svn_root = a
if o == "--svn-project":
@@ -1207,6 +1213,7 @@
print " [--trace=LEVEL] [--force] [--no-action]"
print " [--copy-prcs]"
print " [--copy-svn]"
+ print " [--keep-deleted-files]"
print " [--preserve-dates]"
print " [--svn-root=URL]"
print " [--svn-project=NAME]"
@@ -1237,6 +1244,7 @@
(useful when prcs repository is on nfs).
--copy-svn copy svn repository of a project and extend this copy
(need a svn root beginning with 'file' and not
'http').
+ --keep-deleted-files preserve deleted files after a merge operation
Subversion destination repository and project:
--svn-root=URL set subversion repository root to URL
--
Didier Verna, didier(a)lrde.epita.fr,
http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-BicĂȘtre, France Fax.+33 (1) 53 14 59 22 didier(a)xemacs.org