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
2004-09-13 Akim Demaille <akim(a)epita.fr>
* guidelines.texi: Fix uses of @samp instead of @example.
(ChangeLog Do): Merges.
(Top): Fix locations.
--- /mnt/dload/guidelines/guidelines.txt 2004-08-26 11:56:36.000000000 +0200
+++ guidelines.txt 2004-09-13 12:21:29.000000000 +0200
@@ -1,17 +1,15 @@
LRDE Guidelines
***************
- This document, last edited on August 26, 2004, is a guideline for LRDE
-members. It is available under various forms:
- - Maintain in a single HTML file(1).
+ This document, last edited on September 13, 2004, is a guideline for
+LRDE members. It is available under various forms:
+ - Guidelines in a several HTML file(1).
- - Maintain in several HTML files(2).
+ - Guidelines in PDF(2).
- - Maintain in PDF(3).
+ - Guidelines in text(3).
- - Maintain in text(4).
-
- - Maintain in Info(5).
+ - Guidelines in Info(4).
Some sections are (almost) verbatim copies of texts written by Raphaël
Poss.
@@ -59,15 +57,13 @@
---------- Footnotes ----------
- (1) `http://www.lrde.epita.fr/dload/guidelines/maintain.html'.
-
- (2) `http://www.lrde.epita.fr/dload/guidelines/maintain.split'.
+ (1) `http://www.lrde.epita.fr/dload/guidelines/guidelines.html'.
- (3) `http://www.lrde.epita.fr/dload/guidelines/maintain.pdf'.
+ (2) `http://www.lrde.epita.fr/dload/guidelines/guidelines.pdf'.
- (4) `http://www.lrde.epita.fr/dload/guidelines/maintain.txt'.
+ (3) `http://www.lrde.epita.fr/dload/guidelines/guidelines.txt'.
- (5) `http://www.lrde.epita.fr/dload/guidelines/maintain.info'.
+ (4) `http://www.lrde.epita.fr/dload/guidelines/guidelines.info'.
1 Introduction
**************
@@ -881,11 +877,32 @@
- ChangeLog entries are basically write-once, especially items far in the
past: if you change them, one might have problems tracing a change
- which description changed. Nevertheless, fix mistakes in recent
- entries. If details on a patch are asked, it is probably the sign the
+ which description changed. Nevertheless, *fix mistakes in recent
+ entries*. If details on a patch are asked, it is probably the sign the
ChangeLog was incomplete: complete it! Don't file a ChangeLog entry
for ChangeLog entry fixes.
+ - When *merging a branch* add a tabulation to the added ChangeLog
+ headers, and past all this into your new ChangeLog. Here is an
+ example:
+
+ 2003-10-01 Raphaël Poss <raph(a)lrde.epita.fr>
+
+ Merge the following changes.
+
+ 2003-10-01 Raphaël Poss <raph(a)lrde.epita.fr>
+
+ * src/translate/translation.cc: Fix bug where reference to
+ temporaries were stored in the heap.
+
+ 2003-09-30 Raphaël Poss <raph(a)lrde.epita.fr>
+
+ * Synchronize with main project.
+
+ [...]
+
+ * src/misc/Makefile.am: Mention the new files.
+
6.2.3 ChangeLog Don't
---------------------
@@ -969,24 +986,24 @@
_2. Update your local copy_
To get the lastest changes:
- `$ prcs merge'
+ $ prcs merge
If you have not changed the prj file so far, run:
- `$ prcs checkout myproject myproject.prj'
+ $ prcs checkout myproject myproject.prj
This helps keeping the prj file clean.
_3. Add and remove new/obsolete files_
Get the list of files prcs would add/remove:
- `$ prcs populate -dn'
+ $ prcs populate -dn
Generated files or junk files may be listed. Add them to the
diff-ignore section of the .prj file. When `populate -dn' gives a
clean list of new files, run:
- `$ prcs populate -d'
+ $ prcs populate -d
to add/remove effectively the new/old files into the .prj.
Index: ChangeLog
from Akim Demaille <akim(a)epita.fr>
* prcs2svn/prcs2svn.py: Make all the info calls similar, without
leading spaces in the message.
(xsystem, xtee): Fix the handling of ignErr (was reversed).
Index: prcs2svn/prcs2svn.py
--- prcs2svn/prcs2svn.py (revision 93)
+++ prcs2svn/prcs2svn.py (working copy)
@@ -108,7 +108,7 @@
cmd += "> /dev/null 2> /dev/null"
status = os.system(cmd)
if status:
- error (int (ignErr),
+ error (int (not ignErr),
cmd + ": returned an error (" + status.__str__ () + ")")
def xpopen(cmd, ignErr=False):
@@ -129,7 +129,7 @@
# 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 + ")")
+ error (int (not ignErr), cmd + ": returned an error (" + status + ")")
return res
def xtee (cmd, ignErr=False):
Je ne vous cache pas être singulièrement déçu de trouver des choses
pareilles dans prcs2svn. Bon sang, on n'a plus ce niveau-là !!!
Je ne parle même de la boucle for qui peut certainement s'écrire avec
un map (mais je ne connais pas assez Python pour l'instant).
Index: ChangeLog
from Akim Demaille <akim(a)epita.fr>
Factor!
* prcs2svn/prcs2svn.py (Svn.changes_apply_add): New, replaces...
(Svn.changes_apply_directories_add)
(Svn.changes_apply_links_add)
(Svn.changes_apply_files_add): these similar routines.
BTW, kill some meaningless, and probably antique, comments.
Index: prcs2svn/prcs2svn.py
--- prcs2svn/prcs2svn.py (revision 92)
+++ prcs2svn/prcs2svn.py (working copy)
@@ -601,31 +601,19 @@
f.write("Symbolic link to: " + ref + "\n")
f.close()
- # Add directories.
- # The destination of a renaming may be in a new directory.
- def changes_apply_directories_add(self, diffs):
- if len(diffs.added_dirs):
- info(" > Add directories to Subversion repository")
+
+ def changes_apply_add (self, kind, list):
+ "svn add the new KIND entities in LIST."
+ if list:
+ info(" > Add " + kind + " to Subversion repository")
args = ""
- for d in diffs.added_dirs:
+ for d in list:
info(" * " + d)
- args = args + " " + quote(d)
+ args += " " + quote (d)
if infos.action:
xsystem("svn add --non-recursive" + args)
- # Add Links.
- # FIXME: bad trick to convert some projects.
- def changes_apply_links_add(self, diffs):
- if len(diffs.links):
- info(" > Add links to Subversion repository")
- args = ""
- for l in diffs.links:
- info(" * " + l)
- args = args + " " + quote(l)
- if infos.action:
- xsystem("svn add --non-recursive" + args)
-
# Rename files.
# The source always exists and so does the destination directory.
def changes_apply_files_rename(self, diffs, checkin_login, version_log, \
@@ -673,18 +661,6 @@
for b in backup.keys():
xmove(backup[b], b)
- # Add files.
- # Hard to explain, see movement of "Makefile.am" in oln 0_7_reconf.1.prj.
- def changes_apply_files_add(self, diffs):
- if len(diffs.added_files):
- info(" > Add files to Subversion repository")
- args = ""
- for f in diffs.added_files:
- info(" * " + f)
- args = args + " " + quote(f)
- if infos.action:
- xsystem("svn add --non-recursive" + args)
-
# Delete directories and files.
# Deleting a directory may delete a source of a renaming.
def changes_apply_files_directories_delete(self, diffs):
@@ -706,11 +682,11 @@
# Be careful: the order is very important!
def changes_apply(self, diffs, checkin_login, version_log, checkin_time):
self.changes_apply_links_replace(diffs)
- self.changes_apply_directories_add(diffs)
- self.changes_apply_links_add(diffs)
+ self.changes_apply_add ("directories", diffs.added_dirs)
+ self.changes_apply_add ("symlinks", diffs.links)
self.changes_apply_files_rename(diffs, checkin_login, version_log,
checkin_time)
- self.changes_apply_files_add(diffs)
+ self.changes_apply_add ("files", diffs.added_files)
self.changes_apply_files_directories_delete(diffs)