NOTE: This patch has been committed. The version below is
informational only (whitespace differences have been removed).
ChangeLog addition:
2004-08-24 Didier Verna <didier(a)lrde.epita.fr>
* prcs2svn/prcs2svn.py (Main.initialize_svn_revision): New method.
Code extracted from Main.copy_svn_repository. Initialize the svn
revision number to the youngest, in case the project already
exists.
(Main.init_repositories): Call it at the end.
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 83)
+++ prcs2svn/prcs2svn.py (working copy)
@@ -1064,6 +1064,7 @@
self.copy_prcs_repository()
self.copy_svn_repository()
self.create_svn_repository()
+ self.initialize_svn_revision()
def desinit_repositories(self):
if infos.copy_prcs:
@@ -1110,7 +1111,10 @@
infos.svn_project) + \
" " + new_repo, False)
infos.svn_root = urlparse.urljoin("file://", urllib.pathname2url(tmp))
- pipe = os.popen("svnlook youngest " + new_repo)
+
+ def initialize_svn_revision(self):
+ pipe = os.popen("svnlook youngest " + os.path.join(infos.svn_root[7:],
+ infos.svn_project))
for line in pipe:
infos.initial_svn_revision = int(line)
pipe.close()
--
Didier Verna <didier(a)lrde.epita.fr> / LRDE 01 44 08 01 85