Index: ChangeLog
from Akim Demaille <akim(a)epita.fr>
* prcs2svn/prcs2svn.py (Prcs2svn.merge): Rename some variables and
add info message to help understanding what this routine actually
does.
(Main.main): Report the command line and revision of this tool.
Index: prcs2svn/prcs2svn.py
--- prcs2svn/prcs2svn.py (revision 112)
+++ prcs2svn/prcs2svn.py (working copy)
@@ -985,33 +985,43 @@
xchdir (os.path.join (self.workdir, self.svn.branch))
prcs_merged_parents = []
for prcs_merge_parent in prcsProject.prj.merge_parents:
+ # PRCS Revision to Merge.
+ prcs_m_rev = prcs_merge_parent[0]
# Skip already merged parents (complete/incomplete repetition).
- if prcs_merge_parent[0] in prcs_merged_parents:
+ if prcs_m_rev in prcs_merged_parents:
continue
- prcs_merged_parents.append(prcs_merge_parent[0])
- info("> Merge with PRCS revision " + prcs_merge_parent[0])
- svn_merge_parent = self.prcs_to_svn[prcs_merge_parent[0]]
+ prcs_merged_parents.append (prcs_m_rev)
+
+ # SVN Revision to merge.
+ svn_m_branch = self.prcs_to_svn[prcs_m_rev][0]
+ svn_m_rev = self.prcs_to_svn[prcs_m_rev][1]
+ info("> Merge with PRCS revision %s (%s)" % (prcs_m_rev, svn_m_rev))
+
+ # Previous SVN Revision (of the current branch).
svn_parent = self.prcs_to_svn[prcsProject.prj.parent_version.name()]
+ print >>sys.stderr, "BRANCH: " +
prcsProject.prj.parent_version.name()
+
# Compute most recent common point (see oln 0_5.103).
- svn_branch_start = self.svn.branches[svn_merge_parent[0]][0]
+ print >>sys.stderr, "REV: " +
self.svn.branches[svn_m_branch].__str__ ()
+ svn_branch_start = self.svn.branches[svn_m_branch][0]
if svn_branch_start < self.svn.branches[self.svn.branch][0] and \
- self.svn.branches[self.svn.branch][0] < svn_merge_parent[1]:
+ self.svn.branches[self.svn.branch][0] < svn_m_rev:
svn_branch_start = self.svn.branches[self.svn.branch][0]
# Do merge. Ignore errors, since anyway we will solve all the
# conflicts and make a fresh and clean tree.
xsystem("svn --force merge " + \
"-r " + str(svn_branch_start) + \
- ":" + str(svn_merge_parent[1]) + \
+ ":" + str(svn_m_rev) + \
" " + urlparse.urljoin(self.svn.repository + "/",
- svn_merge_parent[0]), True)
+ svn_m_branch), True)
# The conflicts will be resolved later, tell it now to Subversion.
xsystem("svn resolved --recursive .")
self.svn.changes_commit ("prcs2svn", "Only merge branches, "+\
"conflicts will be resolved later.",
prcsProject.create_date)
# Compute the intermediate project descriptor
- prcs_checkout ("-r " + prcs_merge_parent[0] + " " +
+ prcs_checkout ("-r " + prcs_m_rev + " " +
prcsProject.name + ".prj " + prcsProject.name +
".prj")
prcsProject.prev_prj = prcs.merge(prcsProject.prev_prj,
prcsProject.prj_parser.parse(prcsProject.name + ".prj"),
@@ -1124,6 +1134,8 @@
class Main:
def main(self):
+ info ("This is prcs2svn $Id$.")
+ info ("Command line arguments: " + sys.argv.__str__ ())
self.parse_opt(sys.argv[1:])
self.test_environment()
self.init_repositories()
@@ -1199,6 +1211,7 @@
"svn-root=", "copy-svn",
"svn-project=", "subdir=",
"keep-deleted-files",
+ "no-check",
"no-rekey", "no-ignores"])
except getopt.GetoptError, error_msg:
raise ScanOpt(str(error_msg))
Property changes on: prcs2svn/prcs2svn.py
___________________________________________________________________
Name: svn:keywords
+ Id
Show replies by date