[Python-checkins] pymigr: Merge with other changes.

local python-checkins at python.org
Wed Nov 24 10:24:08 CET 2010


local pushed 273147b49ae2 to pymigr:

http://hg.python.org/pymigr/rev/273147b49ae2
changeset:   72:273147b49ae2
tag:         tip
parent:      71:2c3dde99e94e
parent:      70:abd0dc1328ce
user:        Dirkjan Ochtman <dirkjan at ochtman.nl>
date:        Wed Nov 24 10:24:07 2010 +0100
summary:
  Merge with other changes.

files:
  tasks.txt

diff --git a/author-map b/author-map
--- a/author-map
+++ b/author-map
@@ -186,6 +186,7 @@
 steven.bethard = Steven Bethard <steven.bethard at gmail.com>
 talin = Talin <talin at acm.org>
 tarek.ziade = Tarek Ziadé <ziade.tarek at gmail.com>
+terry.reedy = Terry Reedy <tjreedy at udel.edu>
 teyc = Chui Tey <chui.tey at advdata.com.au>
 theller = Thomas Heller <theller at ctypes.org>
 thomas.heller = Thomas Heller <theller at ctypes.org>
diff --git a/build-identification/README.rst b/build-identification/README.rst
--- a/build-identification/README.rst
+++ b/build-identification/README.rst
@@ -3,31 +3,30 @@
 
 Setting up the environment
 --------------------------
-The current Python development branch is first checkout::
+
+The current Python development branch is first checked out::
 
     svn co http://svn.python.org/projects/python/trunk
 
 A patch will be applied for adding the 'sys.mercurial' attribute
-and modifying the build informations::
+and modifying the build information::
 
-    cp add-hg-build-id.diff trunk/
     cd trunk
-    svn up -r 78019
-    patch -p0 < add-hg-build-id.diff
+    patch -p0 < ../add-hg-build-id.diff
 
-The changed made to 'configure.in' need then to be propagated
+The change made to 'configure.in' then needs to be propagated
 to the configure script::
 
-    autoconf
+    autoreconf
 
 The configuration is then done by::
 
-    ./configure --enable-shared --prefix=/dev/null
+    ./configure [usual args]
 
 You should now see changes propagated to the Makefile for finding
 the revision, the tag and the branch::
 
-    grep MERCURIAL Makefile
+    grep HG Makefile
 
 Finally, Python can be built::
 
@@ -40,8 +39,8 @@
     >>> sys.mercurial
     ('CPython', '', '')
 
-No tag nor revision have been found as there was no mercurial repository. A test
-by the Py_GetBuildInfo() in the C API will also be built::
+Tag or revision have not been found as there was no Mercurial repository.
+A test of the Py_GetBuildInfo() function in the C API can also be built::
 
     gcc -o show-build-info -I. -IInclude -L. -lpython2.7 ../show-build-info.c
 
@@ -52,6 +51,7 @@
 
 Manual test
 -----------
+
 First a fake mercurial tree is built::
 
     hg init
@@ -78,6 +78,6 @@
     -> default:84a6de74e48f, Feb  7 2010, 15:10:13
 
 Automatic tests for checking the behavior for every cases will now work
-build Python and clean afterward. Those tests work only when run from the
+build Python and clean afterward.  Those tests work only when run from the
 trunk svn directory of Python.
 
diff --git a/build-identification/add-hg-build-id.diff b/build-identification/add-hg-build-id.diff
--- a/build-identification/add-hg-build-id.diff
+++ b/build-identification/add-hg-build-id.diff
@@ -1,51 +1,51 @@
 Index: Python/sysmodule.c
 ===================================================================
---- Python/sysmodule.c	(révision 78019)
-+++ Python/sysmodule.c	(copie de travail)
-@@ -1462,6 +1462,9 @@
- 	SET_SYS_FROM_STRING("subversion",
- 			     Py_BuildValue("(ssz)", "CPython", branch,
- 					  svn_revision));
-+	SET_SYS_FROM_STRING("mercurial",
-+			     Py_BuildValue("(szz)", "CPython", _Py_hgidentifier(),
-+					  _Py_hgversion()));
- 	SET_SYS_FROM_STRING("dont_write_bytecode",
- 			     PyBool_FromLong(Py_DontWriteBytecodeFlag));
- 	SET_SYS_FROM_STRING("api_version",
+--- Python/sysmodule.c	(Revision 86546)
++++ Python/sysmodule.c	(Arbeitskopie)
+@@ -1526,6 +1526,9 @@
+     SET_SYS_FROM_STRING("subversion",
+                         Py_BuildValue("(sss)", "CPython", branch,
+                                       svn_revision));
++    SET_SYS_FROM_STRING("_mercurial",
++                        Py_BuildValue("(szz)", "CPython", _Py_hgidentifier(),
++                                      _Py_hgversion()));
+     SET_SYS_FROM_STRING("dont_write_bytecode",
+                          PyBool_FromLong(Py_DontWriteBytecodeFlag));
+     SET_SYS_FROM_STRING("api_version",
 Index: Include/pythonrun.h
 ===================================================================
---- Include/pythonrun.h	(révision 78019)
-+++ Include/pythonrun.h	(copie de travail)
-@@ -114,6 +114,8 @@
+--- Include/pythonrun.h	(Revision 86546)
++++ Include/pythonrun.h	(Arbeitskopie)
+@@ -124,6 +124,8 @@
  PyAPI_FUNC(const char *) _Py_svnversion(void);
  PyAPI_FUNC(const char *) Py_SubversionRevision(void);
  PyAPI_FUNC(const char *) Py_SubversionShortBranch(void);
++PyAPI_FUNC(const char *) _Py_hgidentifier(void);
 +PyAPI_FUNC(const char *) _Py_hgversion(void);
-+PyAPI_FUNC(const char *) _Py_hgidentifier(void);
-
+ 
  /* Internal -- various one-time initializations */
  PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
 Index: configure.in
 ===================================================================
---- configure.in	(révision 78019)
-+++ configure.in	(copie de travail)
-@@ -821,6 +821,21 @@
+--- configure.in	(Revision 86546)
++++ configure.in	(Arbeitskopie)
+@@ -808,6 +808,21 @@
  	SVNVERSION="echo Unversioned directory"
  fi
-
-+AC_SUBST(MERCURIALVERSION)
-+AC_SUBST(MERCURIALTAG)
-+AC_SUBST(MERCURIALBRANCH)
+ 
++AC_SUBST(HGVERSION)
++AC_SUBST(HGTAG)
++AC_SUBST(HGBRANCH)
 +AC_CHECK_PROG(HAS_HG, hg, found, not-found)
 +if test $HAS_HG = found
 +then
-+    MERCURIALVERSION="hg id -i \$(srcdir)"
-+    MERCURIALTAG="hg id -t \$(srcdir)"
-+    MERCURIALBRANCH="hg id -b \$(srcdir)"
++    HGVERSION="hg id -i \$(srcdir)"
++    HGTAG="hg id -t \$(srcdir)"
++    HGBRANCH="hg id -b \$(srcdir)"
 +else
-+    MERCURIALVERSION=""
-+    MERCURIALTAG=""
-+    MERCURIALBRANCH=""
++    HGVERSION=""
++    HGTAG=""
++    HGBRANCH=""
 +fi
 +
  case $MACHDEP in
@@ -53,87 +53,87 @@
  	# install -d does not work on BSDI or HP-UX
 Index: Makefile.pre.in
 ===================================================================
---- Makefile.pre.in	(révision 78019)
-+++ Makefile.pre.in	(copie de travail)
+--- Makefile.pre.in	(Revision 86546)
++++ Makefile.pre.in	(Arbeitskopie)
 @@ -35,6 +35,9 @@
  AR=		@AR@
  RANLIB=		@RANLIB@
  SVNVERSION=	@SVNVERSION@
-+MERCURIALVERSION = @MERCURIALVERSION@
-+MERCURIALTAG = @MERCURIALTAG@
-+MERCURIALBRANCH = @MERCURIALBRANCH@
-
- GNULD=          @GNULD@
-
-@@ -508,7 +511,12 @@
++HGVERSION=      @HGVERSION@
++HGTAG=          @HGTAG@
++HGBRANCH=       @HGBRANCH@
+ SOABI=		@SOABI@
+ LDVERSION=	@LDVERSION@
+ 
+@@ -550,7 +553,12 @@
  		$(SIGNAL_OBJS) \
  		$(MODOBJS) \
  		$(srcdir)/Modules/getbuildinfo.c
--	$(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c
-+	$(CC) -c $(PY_CFLAGS) \
-+        -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" \
-+        -DMERCURIALVERSION="\"`LC_ALL=C $(MERCURIALVERSION)`\"" \
-+        -DMERCURIALTAG="\"`LC_ALL=C $(MERCURIALTAG)`\"" \
-+        -DMERCURIALBRANCH="\"`LC_ALL=C $(MERCURIALBRANCH)`\"" \
-+        -o $@ $(srcdir)/Modules/getbuildinfo.c
-
+-	$(CC) -c $(PY_CORE_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c
++	$(CC) -c $(PY_CORE_CFLAGS) \
++	      -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" \
++	      -DHGVERSION="\"`LC_ALL=C $(HGVERSION)`\"" \
++	      -DHGTAG="\"`LC_ALL=C $(HGTAG)`\"" \
++	      -DHGBRANCH="\"`LC_ALL=C $(HGTAG)`\"" \
++	      -o $@ $(srcdir)/Modules/getbuildinfo.c
+ 
  Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
- 	$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
+ 	$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
 Index: Modules/getbuildinfo.c
 ===================================================================
---- Modules/getbuildinfo.c	(révision 78019)
-+++ Modules/getbuildinfo.c	(copie de travail)
+--- Modules/getbuildinfo.c	(Revision 86546)
++++ Modules/getbuildinfo.c	(Arbeitskopie)
 @@ -28,15 +28,28 @@
  #define SVNVERSION "$WCRANGE$$WCMODS?M:$"
  #endif
-
+ 
 +/* XXX Only unix build process has been tested */
-+#ifndef MERCURIALVERSION
-+#define MERCURIALVERSION ""
++#ifndef HGVERSION
++#define HGVERSION ""
 +#endif
-+#ifndef MERCURIALTAG
-+#define MERCURIALTAG ""
++#ifndef HGTAG
++#define HGTAG ""
 +#endif
-+#ifndef MERCURIALBRANCH
-+#define MERCURIALBRANCH ""
++#ifndef HGBRANCH
++#define HGBRANCH ""
 +#endif
 +
  const char *
  Py_GetBuildInfo(void)
  {
- 	static char buildinfo[50];
--	const char *revision = Py_SubversionRevision();
-+	const char *revision = _Py_hgversion();
- 	const char *sep = *revision ? ":" : "";
--	const char *branch = Py_SubversionShortBranch();
-+	const char *hgid = _Py_hgidentifier();
+     static char buildinfo[50];
+-    const char *revision = Py_SubversionRevision();
++    const char *revision = _Py_hgversion();
+     const char *sep = *revision ? ":" : "";
+-    const char *branch = Py_SubversionShortBranch();
++    const char *hgid = _Py_hgidentifier();
 +    if (!(*hgid))
 +        hgid = "default";
- 	PyOS_snprintf(buildinfo, sizeof(buildinfo),
--		      "%s%s%s, %.20s, %.9s", branch, sep, revision, 
-+		      "%s%s%s, %.20s, %.9s", hgid, sep, revision,
- 		      DATE, TIME);
- 	return buildinfo;
+     PyOS_snprintf(buildinfo, sizeof(buildinfo),
+-                  "%s%s%s, %.20s, %.9s", branch, sep, revision,
++                  "%s%s%s, %.20s, %.9s", hgid, sep, revision,
+                   DATE, TIME);
+     return buildinfo;
  }
 @@ -50,3 +63,21 @@
- 		return svnversion; /* it was interpolated, or passed on command line */
- 	return "Unversioned directory";
+         return svnversion; /* it was interpolated, or passed on command line */
+     return "Unversioned directory";
  }
 +
 +const char *
 +_Py_hgversion(void)
 +{
-+    return MERCURIALVERSION;
++    return HGVERSION;
 +}
 +
 +const char *
 +_Py_hgidentifier(void)
 +{
 +    const char *hgtag, *hgid;
-+    hgtag = MERCURIALTAG;
++    hgtag = HGTAG;
 +    if ((*hgtag) && strcmp(hgtag, "tip") != 0)
 +        hgid = hgtag;
 +    else
-+        hgid = MERCURIALBRANCH;
++        hgid = HGBRANCH;
 +    return hgid;
 +}
diff --git a/hglookup.py b/hglookup.py
--- a/hglookup.py
+++ b/hglookup.py
@@ -4,6 +4,8 @@
 # Also includes special treatment for subversion revisions from
 # the CPython repo.
 #
+# Caveat: Lookup of SVN revisions is O(N).  Should be made smarter.
+#
 # Written by Georg Brandl, 2010.
 
 from mercurial.hgweb.request import wsgirequest
diff --git a/tasks.txt b/tasks.txt
deleted file mode 100644
--- a/tasks.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Migration tasks
-===============
-
-Buildbot
---------
-
-To let the buildbots build out of Mercurial:
-
-* Edit the ``/data/buildbot/master/master.cfg`` on dinsdale and
-  take all steps marked as ``XXX(gbrandl) for Mercurial``.
-
-* Similar edits must be made for the community buildbot master in
-  ``/data/buildbot/community/buildbot``, if these bots are still
-  to be maintained.
-
-* Activate the ``python:/home/hg/repos/hooks/buildbot.py:hook``
-  changegroup hook in the repo used for CPython.  Configure the
-  ``[hgbuildbot]`` section for the buildmaster(s) at
-  ``localhost:9020`` and ``localhost:9070`` (community).
-
-Tracker
--------
-
-Activate the new substitutions in the python-dev tracker instance's
-``extensions/local_replace.py``.
diff --git a/todo.txt b/todo.txt
--- a/todo.txt
+++ b/todo.txt
@@ -1,26 +1,62 @@
-Before test repo (2010-11-14)
+Before test repo (2010-11-20)
+=============================
 
-- tag renaming (mostly done, needs some tuning)
+* tag renaming (mostly done, needs some tuning)
 
 Before final conversion (tentatively 2010-12-12)
+================================================
 
-- write documents for hg n00bs in python-dev
-- HALF DONE investigate roundup changes required
+* write documents for hg n00bs in python-dev
+* HALF DONE investigate roundup changes required
   (issue links are done, rietveld integration pending)
-- (optionally) fight some more about workflow
-- verify automatic installation of changes to ssh keys
-- find a nice way of modifying the templates (possibly involving jinja)
-- make sure the performance is okay
-- check if we should speed up svn revision matching/lookups
+* resolve open issues in PEP 385
+* (optionally) fight some more about workflow and decide the branch structure
+* set up automatic installation of changes to ssh keys, decide upon
+  account managers
+* make sure the performance is okay
+* adapt build identification for Windows build process
 
 Done
+====
 
-- tool to find out in what repo something from the old repo lives
+* tool to find out in what repo something from the old repo lives
   -> see hglookup.py, installed as hg.python.org/lookup
-- port hooks used in svn (whitespace, mailer, buildbot)
+* port hooks used in svn (whitespace, mailer, buildbot)
   -> prototypes for all three are in the hooks repo; buildbot.py is
      verified to work, and mail.py is already used for the distutils2 repo
-- write extension to resolve svn revs to hg nodes
+* write extension to resolve svn revs to hg nodes
   -> see svnrev.py in extensions repo
-- craft .hgeol and make sure we comply with it
+* craft .hgeol and make sure we comply with it
   -> should be done, see py3k svn branch
+
+Optional/Low priority
+=====================
+
+* find a nice way of modifying the templates (possibly involving jinja)
+* check if we should speed up svn revision matching/lookups
+
+After migration
+===============
+
+Buildbot
+--------
+
+To let the buildbots build out of Mercurial:
+
+* Edit the ``/data/buildbot/master/master.cfg`` on dinsdale and
+  take all steps marked as ``XXX(gbrandl) for Mercurial``.
+
+* Similar edits must be made for the community buildbot master in
+  ``/data/buildbot/community/buildbot``, if these bots are still
+  to be maintained.
+
+* Activate the ``python:/home/hg/repos/hooks/buildbot.py:hook``
+  changegroup hook in the repo used for CPython.  Configure the
+  ``[hgbuildbot]`` section for the buildmaster(s) at
+  ``localhost:9020`` and ``localhost:9070`` (community).
+
+Tracker
+-------
+
+Activate the new substitutions in the python-dev tracker instance's
+``extensions/local_replace.py``.

--
Repository URL: http://hg.python.org/pymigr


More information about the Python-checkins mailing list