La conversion du rapport technique n°0307 plante. En gros, il y a un
merge dans ce rapport: la version 0.7 est fille de 0.3 (pas de 0.6) et entre
les deux, un répertoire a disparu avec son contenu, mais le contenu réapparaît
ailleurs dans 0.7.
prcs2svn commence par effacer l'ancien répertoire, puis tente de déplacer son
contenu au nouvel emplacement.
La partie coupable de prcs2svn se trouve en fin de la méthode merge:
,----
| # Fix tc's bug
| if prcs_merge_parent != prcsProject.prj.merge_parents[-1]:
| self.svn.changes_apply_files_directories_delete(diffs)
`-----
Étant donné le caractère douteux de ce code, et compte tenu du commentaire qui
le précède de surcroît, je suggère que ces lignes soient optionnelles, et
désactivées par défaut.
--
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
Index: ChangeLog
from Akim Demaille <akim(a)epita.fr>
The "disregard exit status by default" strategy is rotten!
* prcs2svn/prcs2svn.py (error): Expect an exit status.
(warn, fatal): New.
(xsystem, xtee): By default, do not disregard the exit status.
And these new functions to output better messages and exit when
appropriate.
Adjust all callers.
Flag those where ignoring error is truly OK.
(repositoryCmp.cmp_trunk): Complete PRCS' message with the missing
eol.
Index: prcs2svn/prcs2svn.py
--- prcs2svn/prcs2svn.py (revision 88)
+++ prcs2svn/prcs2svn.py (working copy)
@@ -79,25 +79,30 @@
print msg
sys.stdout.flush()
-def error(msg):
- sys.stderr.write(msg + "\n")
+def error(status, msg):
+ print "prcs2svn: ***" + msg >>sys.stderr
sys.stderr.flush()
+ if status:
+ sys.exit (status)
+
+def warn(msg):
+ error (0, "Warning: " + msg)
+
+def fatal(msg):
+ error (1, "Error: " + msg)
## -------------------------------------
## Misc.
## Print cmd on debug stream and execute it through os.system.
-def xsystem(cmd, ignErr=True):
+def xsystem(cmd, ignErr=False):
debug("os.system(\"" + cmd + "\")")
- if 2 > infos.trace_level:
+ if infos.trace_level < 2:
cmd += "> /dev/null 2> /dev/null"
- if ignErr:
- if os.system(cmd) != 0:
- # Errors may be ignored if the repositories are the same.
- error("** Warning: '" + cmd + "' returned an error.")
- else:
- assert(os.system(cmd) == 0)
+ status = os.system(cmd)
+ if status:
+ error (int (ignErr), cmd + ": returned an error (" + status + ")")
## Add quote for filename, directory's name, ...
def quote(path):
@@ -117,12 +122,10 @@
for line in pipe:
res += len(line)
sys.__stdout__.write(line)
- if not ignErr:
- if pipe.close() != None:
- # Errors may be ignored if the repositories are the same.
- error("** Warning: '" + cmd + "' returned an error.")
- else:
- pipe.close()
+ # What is this supposed to return? There is nothing in the doc! --akim
+ status = pipe.close ()
+ if status:
+ error (int (ignErr), cmd + ": returned an error (" + status + ")")
return res
## Print copy on debug stream and copy a file.
@@ -361,6 +364,9 @@
os.mkdir(self.prcs_project + "_prcs")
os.chdir(self.prcs_project + "_prcs")
xsystem("prcs checkout -f " + prcs_revision + self.prjname ())
+ # PRCS sometimes lacks a \n after the messages emitted by checkout -f.
+ if 2 <= infos.trace_level:
+ print
svn_repo = os.path.join(self.svn_project, os.path.join(infos.subdir, "trunk"))
if len(infos.prcs_projects) > 1:
svn_repo = os.path.join(svn_repo, self.prcs_project)
@@ -456,7 +462,7 @@
self.topdir = topdir
self.workdir = os.path.join(self.topdir, infos.subdir)
info("> Checkout subversion repository")
- xsystem("svn checkout " + self.repository + " " + quote(self.topdir), False)
+ xsystem("svn checkout " + self.repository + " " + quote(self.topdir))
info("> Create subversion repository tree")
if len(infos.subdir) > 0:
xsystem("svn mkdir " + infos.subdir, False)
@@ -541,7 +547,7 @@
"--username " + checkin_login + " --file " + log_path)
if r > 0:
self.revision += 1
- # Refresh local copy (should be useness, may be a bug of svn).
+ # Refresh local copy (should be useless, may be a bug of svn).
if update:
xsystem("svn update")
os.remove(log_path)
@@ -946,12 +952,14 @@
if svn_branch_start < self.svn.branches[self.svn.branch][0] and \
self.svn.branches[self.svn.branch][0] < svn_merge_parent[1]:
svn_branch_start = self.svn.branches[self.svn.branch][0]
- # Do merge.
+
+ # 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]) + \
" " + urlparse.urljoin(self.svn.repository + "/",
- svn_merge_parent[0]))
+ svn_merge_parent[0]), True)
# The conflicts will be resolved later, tell it now to Subversion.
xsystem("svn resolved --recursive .")
self.svn.changes_commit("prcs2svn", "Only merge branches, "+\
Index: ChangeLog
from Akim Demaille <akim(a)epita.fr>
* guidelines.texi (Typical Year): New, from Wiki.
Index: guidelines.texi
--- guidelines.texi (revision 50)
+++ guidelines.texi (working copy)
@@ -109,8 +109,9 @@
* Meetings:: Wednesday's "Grand Messe"
* System Administration:: Rules to obey
-* Buying Books::
+* Buying Books:: Extending the LRDE Library
* Entering the Lab:: Night access
+* Typical Year::
Buying Books
@@ -197,8 +198,9 @@
@menu
* Meetings:: Wednesday's "Grand Messe"
* System Administration:: Rules to obey
-* Buying Books::
+* Buying Books:: Extending the LRDE Library
* Entering the Lab:: Night access
+* Typical Year::
@end menu
@node Meetings
@@ -380,6 +382,118 @@
Lire le Passe-muraille (Marcel Aymé) et s'en inspirer.
@end itemize
+------------------------------------- Entering the Lab
+
+@node Typical Year
+@section Typical Year
+
+@table @strong
+@item January
+@itemize
+@item
+Beginning of P4: 2nd chance recruiting of Ing2 students.
+@item
+LRDE: Present the LRDE to Ing1 students.
+@item
+Last week: Ask for CSI candidates; hold HalfDays (Ing2 students).
+@item
+End (or beginning of February): Recruiting of Ing1 students.
+@end itemize
+
+@item February
+@itemize
+@item
+Beginning: Recruiting of Ing1 students.
+@item
+End: Preseminar: Ing1 & 2 students present during 3 minutes their working plan with 2 slides.
+@end itemize
+
+@item March
+@itemize
+@item
+Csi.DEA: Prompt the students to look for the Csi.DEA they want to follow.
+@end itemize
+
+
+@item April
+@item May
+@itemize
+@item
+End: grades for Ing1 & Ing2 grade sheets:
+@item
+Ing 1 (P2): mentoring, social life, preseminar (@samp{> average grade } compensatory grade)
+@item
+Ing 2 (P4): mentoring, social life, preseminar (+ HalfDays ?)
+@item
+End: Ing 2: start series of LRDE seminars on wednesdays: reports and slides must be ready before the seminar and are assessed immediately (=> grades for september P5: oral & report)
+@end itemize
+
+@item June
+@itemize
+@item
+Beginning: LRDE seminars on wednesdays:
+@item
+Ing 2: reports and slides must be ready before the seminar and are assessed immediately (=> grades for september P5: oral & report)
+@item
+Ing 1: reports and slides must be ready before the seminar and are assessed immediately (=> grades for september P3: oral & report count for compensatory grades)
+@end itemize
+
+@item July
+@itemize
+@item
+CSI English exam:
+@item
+CSI English: for P3 (grades count for compensatory grades)
+@item
+CSI English: passed in P5, grades count for P6
+@end itemize
+
+
+@item August
+@item September
+@itemize
+@item
+End: grade sheets for Ing2 (former Ing1) & Ing3 (former Ing2) students
+@item
+P3: oral, report (@samp{ grades from June), CSI English (} grades from
+July), development, research (@samp{ grades from after the summer) }>
+average grade = compensatory grade
+@item
+P5: oral and report (= grades from May and June), mentoring and social
+life (new grades or same as in P4)
+@item
+C-Minar: Presentation of the LRDE to new Ing students.
+@item
+InfoSup: Likewise. Requested by the direction.
+@end itemize
+
+@item October
+@itemize
+@item
+Ing 2: internship core curriculum
+@end itemize
+
+@item November
+
+@itemize
+@item
+Ing 2: internship core curriculum
+@item
+Ing 3: LRDE seminars on wednesdays: reports and slides from May or June are improved (final results), must be ready before the seminar and are assessed immediately (grades for P6).
+@end itemize
+
+
+@item December
+@itemize
+@item
+Ing 2: internship core curriculum
+@item
+End: grade sheets for Ing3 students (P6): development and research
+(final grades from November for the work at the LRDE), CSI English
+(grades from July P5)
+@end itemize
+@end table
+
@c ======================================================================
@node External Communication
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/prcs.py (diff): Properly detect depopulated symlinks,
and schedule them for deletion: don't assume that identical PRCS
keys means same file in case of symlinks.
lrde-tools source patch:
Diff command: svn diff --diff-cmd /usr/bin/diff -x "-u -t -b -B -w"
Files affected: prcs2svn/prcs.py
Index: prcs2svn/prcs.py
===================================================================
--- prcs2svn/prcs.py (revision 84)
+++ prcs2svn/prcs.py (working copy)
@@ -423,8 +423,13 @@
deleted_p = True
for j in prj.files:
if i[0] == j[0] or \
- (len(i[1]) > 0 and len(j[1]) > 0 and i[1][0] == j[1][0]):
- # same name or same key
+ (len(i[1]) > 0 and len(j[1]) > 0 and i[1][0] == j[1][0] \
+ and (len(i) < 3 or i[2] != ":symlink" \
+ or len(j) < 3 or j[2] != ":symlink")):
+ # #### WARNING: identical symbolic links have the same key (since it
+ # is the name of the pointed file). Hence we can't deduce that it's a
+ # renaming. -- dvl
+ # same name or same key (except for symlinks)
deleted_p = False
break
if deleted_p:
--
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
Tiré de prcs2svn:
,----
| def init_repositories(self):
| [ ... ]
| self.create_svn_repository()
| [ ... ]
|
| [ ... ]
|
| def create_svn_repository(self):
| if infos.svn_root[0] != 'f':
| return
| [ ... ]
`-----
Personnellement, je n'aime pas du tout ce style de programmation (par style,
j'entend ici appeller inconditionnellement des méthodes qui peuvent ne rien
faire):
1/ C'est peu lisible. Au minimum, ces méthodes devraient s'appeler maybe_...
2/ Ça fait des appels de fonction qui retournent tout de suite ce qui n'est
pas beau (bien sûr je pinaille, mais c'est au niveau des principes).
3/ D'autant que le test est fait sur quelque chose de global (infos).
4/ Donc il est bien plus propre de sortir le test de la fonction elle-même.
--
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
>>> "Akim" == Akim Demaille <akim(a)epita.fr> writes:
> tc supports these two options to decide how many $s? and $t? there are
> on the mips we target. This is a cool feature to exercise the
> regallocation. But it would be even cooler if Nolimips supported
> these two options too, since that would make it possible to check that
> tc is not cheating, using $s7 when --callee-save=0.
> src/tc/trunk % src/tc --callee-save=0 --caller-save=3 --target-display -
> CPU (12)
> Arguments (4): $a0, $a1, $a2, $a3
> Caller Save (3): $t0 $t1 $t2
> Callee Save (0):
> Special (5): $fp $ra $sp $v0 $zero
> src/tc/trunk % src/tc --target-display - nostromo 15:47
> CPU (27)
> Arguments (4): $a0, $a1, $a2, $a3
> Caller Save (10): $t0 $t1 $t2 $t3 $t4 $t5 $t6 $t7 $t8 $t9
> Callee Save (8): $s0 $s1 $s2 $s3 $s4 $s5 $s6 $s7
> Special (5): $fp $ra $sp $v0 $zero
Je voudrais insister sur les bénéfices de telles options !
I am at training this week an may not have access to email. Will get back to you Monday. If this is urgent, call my office number 585-671-4400. Leave a message.
Enjoy the summer!
--------------------
Original Message:
X-Rocket-Spam: 129.250.36.41
X-YahooFilteredBulk: 129.250.36.41
X-Rocket-Track: -70 ; SFLAG=BADURLLIST=bolguarou.biz:0 ; IPCR=n-w0,n100,g0 ; IP=129.250.36.41 ; SERVER=66.163.174.33
X-Originating-IP: [129.250.36.41]
Return-Path: <projects(a)lrde.epita.fr>
Received: from 129.250.36.41 (EHLO dfw-smtpout1.email.verio.net) (129.250.36.41)
by mtavm100.mail.yahoo.com with SMTP; Thu, 19 Aug 2004 10:44:06 -0700
Received: from [129.250.36.53] (helo=dfw-smtpin3.email.verio.net)
by dfw-smtpout1.email.verio.net with esmtp
id 1BxqxJ-0005pK-BB
for bobf(a)oppgrp.net; Thu, 19 Aug 2004 17:44:05 +0000
Received: from [65.95.128.42] (helo=keithley.com)
by dfw-smtpin3.email.verio.net with smtp
id 1BxqxI-0005CP-LE
for rfreeser(a)servtech.com; Thu, 19 Aug 2004 17:44:04 +0000
Date: Thu, 19 Aug 2004 17:39:58 +0000
From: projects(a)lrde.epita.fr
Subject: updates
To: Rfreeser <rfreeser(a)servtech.com>
References: <ILKK69CAFCB449F4(a)servtech.com>
In-Reply-To: <ILKK69CAFCB449F4(a)servtech.com>
Message-ID: <J31FEGIJFDGF