Yeaaaahhhh, I EVENTUALLY have the Net.
And thus will I continue Nolimips' development.
Quick road map:
1. limit access to native registers (see tc's caller-save);
2. add an ELF branch (encoder, loader, memory management redesign);
3. add everything that spim has and Nolimips does not;
4. implement libc-like system calls.
--
Noe
Nicolas, peut-tu mettre ton expertise yaml perl au service de checkin
pour qu'on ait un fichier de conf pour paramétrer "checkin", plutôt
que des vars d'env ?
Merci !
2004-09-20 Akim Demaille <akim(a)epita.fr>
* src/checkin (get_user_info): Fix the use of getpwnam.
* doc/lrdetools.texi: Space changes.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 102)
+++ ChangeLog (working copy)
@@ -1,5 +1,10 @@
2004-09-20 Akim Demaille <akim(a)epita.fr>
+ * src/checkin (get_user_info): Fix the use of getpwnam.
+ * doc/lrdetools.texi: Space changes.
+
+2004-09-20 Akim Demaille <akim(a)epita.fr>
+
* prcs2svn/prcs2svn.py (string_unescape): Remove, useless.
* prcs2svn/prcs.py: s/\([a-z_]*\) * = *\1 *\+/\1 +=/.
(ProjectScanner.get_token): Do not escape the strings! This is not
Index: src/checkin
===================================================================
--- src/checkin (revision 96)
+++ src/checkin (working copy)
@@ -128,7 +128,9 @@
$params{"FULLNAME"} = $ENV{"FULLNAME"};
if (not defined $params{"FULLNAME"})
{
- $params{"FULLNAME"} = getpwnam $ENV{"USER"}[6];
+ $params{"FULLNAME"} =
+ # Keep the Full Name, first ,-field.
+ (split /,/, (getpwnam $ENV{"USER"})[6])[0];
print STDERR "Warning: FULLNAME not set, using " . $params{"FULLNAME"} .
" instead.\n";
}
Index: doc/lrdetools.texi
===================================================================
--- doc/lrdetools.texi (revision 96)
+++ doc/lrdetools.texi (working copy)
@@ -330,9 +330,9 @@
@node checkin
@section @command{checkin}
-@command{checkin} is a Perl script designed to work conjointly with CVS,
-PRCS or Subversion. When launched, it produces diffs from the server
-and creates a @file{ChangeLog} entry with each modified file. It then
+@command{checkin} is designed to work conjointly with CVS, PRCS or
+Subversion. When launched, it produces diffs from the server and
+creates a @file{ChangeLog} entry with each modified file. It then
launches your favorite text editor on the diff file and the
@file{ChangeLog}, to allow you complete it. Once you have finished, it
proposes you to write a particular comment. Then the checkin (or
@@ -432,9 +432,9 @@
@node Using checkin
@subsection Using @command{checkin}
-@command{checkin} always start by doing a checkout or an update onto
-the repository unless you told him explicitly not to do so. This
-avoid dummy mistakes.
+@command{checkin} always start by doing a checkout or an update onto the
+repository unless you told him explicitly not to do so. This avoid dummy
+mistakes.
@command{checkin} generates the following files:
Index: ChangeLog
from Akim Demaille <akim(a)epita.fr>
* prcs2svn/prcs2svn.py (string_unescape): Remove, useless.
* prcs2svn/prcs.py: s/\([a-z_]*\) * = *\1 *\+/\1 +=/.
(ProjectScanner.get_token): Do not escape the strings! This is not
your business.
Index: prcs2svn/prcs2svn.py
--- prcs2svn/prcs2svn.py (revision 101)
+++ prcs2svn/prcs2svn.py (working copy)
@@ -157,12 +157,6 @@
(e.g., via system calls)."""
return "\"" + re.sub (r'(["\\$`])', r'\\\1', arg) + "\""
-## (Un)escape special chars in sh.
-def string_unescape(s):
- r = string.replace (s, "\$", "$")
- r = string.replace (r, "\\\\", "\\")
- return r
-
## Print copy on debug stream and copy a file.
def xcopy(src, dst):
trace ("cp --force " + src + " " + dst)
Index: prcs2svn/prcs.py
--- prcs2svn/prcs.py (revision 96)
+++ prcs2svn/prcs.py (working copy)
@@ -40,9 +40,9 @@
dirs = dirname.split(os.sep)
p = ""
for d in dirs:
- p = p + d
+ p += d
dictionary[p] = True
- p = p + os.sep
+ p += os.sep
return dictionary
## Convert a list into a pretty string.
@@ -50,9 +50,9 @@
res = ""
i = len(l)
for e in l:
- res = res + str(e)
+ res += str(e)
if i > 1:
- res = res + " "
+ res += " "
i = i - 1
return res
@@ -61,9 +61,9 @@
res = ""
for e in sx:
if isinstance(e, list):
- res = res + "(" + sexpr_to_string(e) +") "
+ res += "(" + sexpr_to_string(e) +") "
else:
- res = res + str(e) + " "
+ res += str(e) + " "
return res
## Sort file names by path.
@@ -122,7 +122,7 @@
## Convert the project file into a string
def __str__(self):
res = ";; -*- Prcs -*-\n"
- res = res + \
+ res += \
"(Created-By-Prcs-Version " +\
list_to_string(self.created_by_prcs_version) + ")\n\n" +\
"(Project-Description \"" + self.description + "\")\n" +\
@@ -132,26 +132,26 @@
"(New-Version-Log\n\"" + self.new_version_log + "\")\n\n" +\
"(Checkin-Time \"" + self.checkin_time + "\")\n" +\
"(Checkin-Login " + self.checkin_login + ")\n\n"
- res = res + "(Files\n" + "\n ;; ./" + "\n"
+ res += "(Files\n" + "\n ;; ./" + "\n"
current_dir = ""
for e in self.files:
i = string.rfind(e[0], "/")
if i != -1:
dir = e[0][:i]
if current_dir != dir:
- res = res + "\n ;; ./" + dir + "/\n"
+ res += "\n ;; ./" + dir + "/\n"
current_dir = dir
- res = res + " (" + e[0] + " (" + list_to_string(e[1]) + ")"
+ res += " (" + e[0] + " (" + list_to_string(e[1]) + ")"
if len(e) >= 3:
- res = res + " " + e[2]
- res = res + ")\n"
- res = res + " )\n\n"
- res = res + "(Populate-Ignore\n (\n"
+ res += " " + e[2]
+ res += ")\n"
+ res += " )\n\n"
+ res += "(Populate-Ignore\n (\n"
if len(self.populate_ignore) > 0:
for e in self.populate_ignore[0]:
- res = res + " " + str(e) + "\n"
- res = res + " )\n )\n\n"
- res = res +\
+ res += " " + str(e) + "\n"
+ res += " )\n )\n\n"
+ res +=\
"(Project-Keywords " +\
sexpr_to_string(self.project_keywords) +")\n\n" +\
"(Merge-Parents " +\
@@ -191,8 +191,8 @@
if c == '\\':
c = self.getc()
if c not in ['\\', '"']:
- s = s + '\\'
- s = s + c
+ s += '\\'
+ s += c
c = self.getc()
if c == "":
return ""
@@ -217,9 +217,7 @@
if (len(self.token) > 1 and
c in [" ", ":", "(", ")"] and self.token[-1] == '\\'):
self.token = self.token[:-1]
- if c in ["\"", "$"]:
- self.token = self.token + "\\"
- self.token = self.token + c
+ self.token += c
c = self.getc()
self.ungetc()
return self.token
@@ -329,19 +327,19 @@
def __str__(self):
res = ""
for i in self.links:
- res = res + i + "\t symbolic link\n"
+ res += i + "\t symbolic link\n"
for i in self.added_dirs:
- res = res + i + "\tadded directory\n"
+ res += i + "\tadded directory\n"
for i in self.added_files:
- res = res + i + "\tadded file\n"
+ res += i + "\tadded file\n"
for i in self.renamed:
- res = res + i[1] + "\trenamed from " + i[0] + "\n"
+ res += i[1] + "\trenamed from " + i[0] + "\n"
for i in self.deleted_files:
- res = res + i + "\tdeleted file\n"
+ res += i + "\tdeleted file\n"
for i in self.deleted_dirs:
- res = res + i + "\tdeleted directory\n"
+ res += i + "\tdeleted directory\n"
for i in self.modified:
- res = res + i + "\tmodified\n"
+ res += i + "\tmodified\n"
return res