I recently wrote about a problem with FreshPorts not tracking changes by branch. I recently patched the dev system and things are looking better.
The patch is:
$ svn di Index: sp.txt =================================================================== --- sp.txt (revision 4560) +++ sp.txt (working copy) @@ -462,10 +462,11 @@ $$ LANGUAGE 'plpgsql'; -CREATE OR REPLACE FUNCTION RevisionForTagGet(int4, int4 ) RETURNS text AS $$ +CREATE OR REPLACE FUNCTION RevisionForTagGet(int4, int4, text) RETURNS text AS $$ DECLARE SystemBranchID ALIAS for $1; ElementID ALIAS for $2; + RevisionName ALIAS for $3; TempRevisionName text; -- for a given Element and TagName (System version id) @@ -476,7 +477,8 @@ into TempRevisionName from system_branch_element_revision where system_branch_id = SystemBranchID - and element_id = ElementID; + and element_id = ElementID + and revision_name = RevisionName; return TempRevisionName; END; @@ -513,7 +515,7 @@ BEGIN -- has this element already been tagged with this version? - ExistingRevisionFound := RevisionForTagGet(SystemBranchID, ElementID); + ExistingRevisionFound := RevisionForTagGet(SystemBranchID, ElementID, RevisionName); IF ExistingRevisionFound IS NULL THEN insert into system_branch_element_revision
This change forces the code to look for an existing row in the system_branch_element_revision table, and if not found, add it in.
I used this commit against news/trn4 as an example.
Let’s look at what file were touched by that commit:
freshports.org=# SELECT CL.id, CLE.*, element_pathname(element_id) FROM commit_log CL, commit_log_elements CLE WHERE CL.message_id = E'201401101902.s0AJ2xCQ043601@svn.freebsd.org' AND CLE.commit_log_id = CL.id; id | id | commit_log_id | element_id | revision_name | change_type | element_pathname --------+---------+---------------+------------+---------------+-------------+-------------------------------- 488494 | 2206255 | 488494 | 4161 | 329591 | M | /ports/head/news/trn4/Makefile (1 row) freshports.org=#
This is where my previous investigation broke down.
Let’s expand that query just a little bit and grab the system branch id:
freshports.org=# SELECT CL.id, CLE.*, element_pathname(CLE.element_id), SBER.system_branch_id FROM commit_log CL, commit_log_elements CLE, system_branch_element_revision SBER WHERE CL.message_id = E'201401101902.s0AJ2xCQ043601@svn.freebsd.org' AND CLE.commit_log_id = CL.id AND CLE.element_id = SBER.element_id AND CLE.revision_name = SBER.revision_name; id | id | commit_log_id | element_id | revision_name | change_type | element_pathname | system_branch_id --------+---------+---------------+------------+---------------+-------------+---------------------------------+------------------ 502195 | 2278735 | 502195 | 55333 | 339381 | M | /ports/head/news/trn4/pkg-plist | 1 (1 row) freshports.org=#
OK, there we have the branch id.
Let’s try a similar command for all commit done in the past 24 hours. Scroll down in that… there are 275 rows, and not all are visible without scrolling.
freshports.org=# SELECT CL.message_id, CLE.element_id, element_pathname(CLE.element_id), SBER.system_branch_id FROM commit_log CL, commit_log_elements CLE LEFT OUTER JOIN system_branch_element_revision SBER on CLE.revision_name = SBER.revision_name WHERE CLE.commit_log_id = CL.id AND CLE.element_id = SBER.element_id AND CL.date_added > now() - interval E'24 hours' ORDER BY CL.message_id, element_pathname(CLE.element_id); message_id | element_id | element_pathname | system_branch_id ---------------------------------------------+------------+----------------------------------------------------------------------------+------------------ 201401101512.s0AFCqkg055170@svn.freebsd.org | 550818 | /ports/head/devel/lua-posix/files/patch-ext__posix__posix.c | 1 201401101609.s0AG9BsC074674@svn.freebsd.org | 475920 | /ports/head/devel/lua-lgi/distinfo | 121 201401101609.s0AG9BsC074674@svn.freebsd.org | 475924 | /ports/head/devel/lua-lgi/pkg-plist | 121 201401101635.s0AGZqXm085900@svn.freebsd.org | 550820 | /ports/head/math/aspcud | 1 201401101635.s0AGZqXm085900@svn.freebsd.org | 550821 | /ports/head/math/aspcud/Makefile | 1 201401101635.s0AGZqXm085900@svn.freebsd.org | 550822 | /ports/head/math/aspcud/distinfo | 1 201401101635.s0AGZqXm085900@svn.freebsd.org | 550823 | /ports/head/math/aspcud/files | 1 201401101635.s0AGZqXm085900@svn.freebsd.org | 550824 | /ports/head/math/aspcud/files/patch-libcudf-src-dependency.cpp | 1 201401101635.s0AGZqXm085900@svn.freebsd.org | 550825 | /ports/head/math/aspcud/files/patch-scripts-aspcud.sh | 1 201401101635.s0AGZqXm085900@svn.freebsd.org | 550826 | /ports/head/math/aspcud/pkg-descr | 1 201401101635.s0AGZqXm085900@svn.freebsd.org | 550827 | /ports/head/math/aspcud/pkg-plist | 1 201401101656.s0AGuxNV093545@svn.freebsd.org | 533308 | /base/stable/10 | 121 201401101656.s0AGuxNV093545@svn.freebsd.org | 550345 | /base/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c | 121 201401101659.s0AGxS3T093870@svn.freebsd.org | 68619 | /ports/head/editors/vim/Makefile | 1 201401101710.s0AHAeA5098815@svn.freebsd.org | 323952 | /ports/head/devel/lua-sysctl/Makefile | 1 201401101710.s0AHAeA5098815@svn.freebsd.org | 323953 | /ports/head/devel/lua-sysctl/distinfo | 1 201401101717.s0AHHc9l001954@svn.freebsd.org | 404940 | /ports/head/devel/lua-sysctl/files | 1 201401101717.s0AHHc9l001954@svn.freebsd.org | 550828 | /ports/head/devel/lua-sysctl/files/patch-src__lua_sysctl.c | 1 201401101720.s0AHKOjw002676@svn.freebsd.org | 291311 | /ports/head/devel/lua-bitlib/Makefile | 1 201401101720.s0AHKOjw002676@svn.freebsd.org | 550829 | /ports/head/devel/lua-bitlib/files | 1 201401101720.s0AHKOjw002676@svn.freebsd.org | 550830 | /ports/head/devel/lua-bitlib/files/patch-lbitlib.c | 1 201401101724.s0AHOi0o005520@svn.freebsd.org | 48424 | /ports/head/games/xboard/distinfo | 1 201401101725.s0AHPisR005790@svn.freebsd.org | 360547 | /ports/head/mail/rspamd/Makefile | 1 201401101725.s0AHPisR005790@svn.freebsd.org | 360548 | /ports/head/mail/rspamd/distinfo | 1 201401101740.s0AHeUmL010180@svn.freebsd.org | 464102 | /base/stable/9 | 121 201401101740.s0AHeUmL010180@svn.freebsd.org | 464103 | /base/stable/9/sys | 121 201401101740.s0AHeUmL010180@svn.freebsd.org | 464812 | /base/stable/9/sys/cddl/contrib/opensolaris | 121 201401101740.s0AHeUmL010180@svn.freebsd.org | 465400 | /base/stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c | 121 201401101756.s0AHuOTm017062@svn.freebsd.org | 550831 | /base/stable/10/etc/syslog.conf | 124 201401101756.s0AHuOTm017062@svn.freebsd.org | 550833 | /base/stable/10/sbin/devd/devd.cc | 124 201401101805.s0AI5T3i021151@svn.freebsd.org | 79186 | /ports/head/audio/Makefile | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550834 | /ports/head/audio/csound6 | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550840 | /ports/head/audio/csound6/Makefile | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550841 | /ports/head/audio/csound6/distinfo | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550842 | /ports/head/audio/csound6/files/patch-InOut-rtalsa.c | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550843 | /ports/head/audio/csound6/files/patch-Top-csound.c | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550836 | /ports/head/audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550837 | /ports/head/audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550844 | /ports/head/audio/csound6/pkg-descr | 1 201401101805.s0AI5T3i021151@svn.freebsd.org | 550845 | /ports/head/audio/csound6/pkg-plist | 1 201401101814.s0AIEGYC025081@svn.freebsd.org | 464429 | /base/stable/9/sbin | 123 201401101814.s0AIEGYC025081@svn.freebsd.org | 464805 | /base/stable/9/sbin/devd | 123 201401101814.s0AIEGYC025081@svn.freebsd.org | 475476 | /base/stable/9/sbin/devd/devd.cc | 123 201401101818.s0AIIpxF025633@svn.freebsd.org | 137799 | /doc/head/share/misc/docbook.css | 1 201401101818.s0AIIpxF025633@svn.freebsd.org | 537333 | /doc/head/share/xml/freebsd-fo.xsl | 1 201401101818.s0AIIpxF025633@svn.freebsd.org | 537336 | /doc/head/share/xml/freebsd-xhtml-common.xsl | 1 201401101840.s0AIelaR035195@svn.freebsd.org | 4161 | /ports/head/news/trn4/Makefile | 1 201401101850.s0AIoSpm036891@svn.freebsd.org | 326201 | /ports/head/audio/liblastfm/Makefile | 1 201401101856.s0AIu8Dl040098@svn.freebsd.org | 260770 | /ports/head/net/ushare/Makefile | 1 201401101902.s0AJ2xCQ043601@svn.freebsd.org | 55333 | /ports/head/news/trn4/pkg-plist | 1 201401101921.s0AJLkBc051178@svn.freebsd.org | 272715 | /base/head/sys/dev/mfi/mfi_cam.c | 1 201401101941.s0AJf1Vc058167@svn.freebsd.org | 76989 | /base/head/share/man/man4/Makefile | 1 201401101941.s0AJf1Vc058167@svn.freebsd.org | 550846 | /base/head/share/man/man4/geom_uncompress.4 | 1 201401102029.s0AKTk7V074783@svn.freebsd.org | 453214 | /base/head/sys/geom/uncompress/g_uncompress.c | 1 201401102029.s0AKTk7V074783@svn.freebsd.org | 140978 | /base/head/sys/modules/geom/Makefile | 1 201401102029.s0AKTk7V074783@svn.freebsd.org | 550848 | /base/head/sys/modules/geom/geom_uncompress/Makefile | 1 201401102033.s0AKXjTr077914@svn.freebsd.org | 122808 | /ports/head/security/gnutls/Makefile | 1 201401102038.s0AKc64Q078456@svn.freebsd.org | 185973 | /ports/head/devel/pylint/Makefile | 1 201401102038.s0AKc64Q078456@svn.freebsd.org | 185974 | /ports/head/devel/pylint/distinfo | 1 201401102038.s0AKc64Q078456@svn.freebsd.org | 185976 | /ports/head/devel/pylint/pkg-plist | 1 201401102111.s0ALBbDV092959@svn.freebsd.org | 512187 | /ports/head/multimedia/tvheadend/Makefile | 1 201401102200.s0AM0xPg010875@svn.freebsd.org | 488014 | /doc/head/en_US.ISO8859-1/books/porters-handbook/uses.xml | 1 201401102209.s0AM97Yg013006@svn.freebsd.org | 533174 | /ports/head/Mk/Uses/compiler.mk | 1 201401102221.s0AMLPGR019775@svn.freebsd.org | 331604 | /ports/head/devel/bmake/Makefile | 1 201401102224.s0AMOo7U020206@svn.freebsd.org | 415632 | /ports/head/java/eclipse-ecj/Makefile | 1 201401102237.s0AMb6qP024423@svn.freebsd.org | 461045 | /doc/head/en_US.ISO8859-1/articles/contributors/contrib.committers.xml | 121 201401102237.s0AMb6qP024423@svn.freebsd.org | 461547 | /doc/head/share/pgpkeys/pgpkeys-developers.xml | 121 201401102237.s0AMb6qP024423@svn.freebsd.org | 139519 | /doc/head/share/pgpkeys/pgpkeys.ent | 121 201401102237.s0AMb6qP024423@svn.freebsd.org | 550849 | /doc/head/share/pgpkeys/riggs.key | 121 201401102237.s0AMb6qP024423@svn.freebsd.org | 460812 | /doc/head/share/xml/news.xml | 121 201401102304.s0AN470n035389@svn.freebsd.org | 42639 | /ports/head/sysutils/logrotate/Makefile | 1 201401102304.s0AN470n035389@svn.freebsd.org | 50682 | /ports/head/sysutils/logrotate/distinfo | 1 201401102304.s0AN470n035389@svn.freebsd.org | 176748 | /ports/head/sysutils/logrotate/files/patch-Makefile | 1 201401102304.s0AN470n035389@svn.freebsd.org | 267050 | /ports/head/sysutils/logrotate/pkg-plist | 1 201401102306.s0AN697W035768@svn.freebsd.org | 487949 | /ports/head/sysutils/ptools/Makefile | 1 201401102306.s0AN697W035768@svn.freebsd.org | 487950 | /ports/head/sysutils/ptools/distinfo | 1 201401102307.s0AN772F036028@svn.freebsd.org | 266195 | /ports/head/audio/last.fm/Makefile | 1 201401102307.s0AN772F036028@svn.freebsd.org | 550850 | /ports/head/audio/last.fm/files/patch-src__lastfmapplication.cpp | 1 201401102307.s0AN772F036028@svn.freebsd.org | 550851 | /ports/head/audio/last.fm/files/patch-src__libUnicorn__TrackInfo.h | 1 201401102307.s0AN772F036028@svn.freebsd.org | 550852 | /ports/head/audio/last.fm/files/patch-src__libUnicorn__UnicornCommon.cpp | 1 201401102307.s0AN772F036028@svn.freebsd.org | 550853 | /ports/head/audio/last.fm/files/patch-src__playerlistener.cpp | 1 201401102307.s0AN772F036028@svn.freebsd.org | 266207 | /ports/head/audio/last.fm/pkg-plist | 1 201401102308.s0AN8I4G036239@svn.freebsd.org | 225430 | /base/head/sbin/route/keywords | 121 201401102308.s0AN8I4G036239@svn.freebsd.org | 80765 | /base/head/sbin/route/route.c | 121 201401102308.s0AN8I4G036239@svn.freebsd.org | 88761 | /base/head/usr.bin/netstat/main.c | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 534702 | /base/head/etc/mtree/BSD.tests.dist | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 536340 | /base/head/lib/atf/libatf-c++/tests/Makefile | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 550854 | /base/head/lib/atf/libatf-c++/tests/Makefile.inc | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 550855 | /base/head/lib/atf/libatf-c++/tests/detail | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 550856 | /base/head/lib/atf/libatf-c++/tests/detail/Makefile | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 536343 | /base/head/lib/atf/libatf-c/tests/Makefile | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 550857 | /base/head/lib/atf/libatf-c/tests/Makefile.inc | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 550858 | /base/head/lib/atf/libatf-c/tests/detail | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 550859 | /base/head/lib/atf/libatf-c/tests/detail/Makefile | 121 201401102338.s0ANcX15047582@svn.freebsd.org | 240577 | /base/head/tools/build/mk/OptionalObsoleteFiles.inc | 121 201401102341.s0ANf1Bi048476@svn.freebsd.org | 502663 | /base/head/contrib/atf/atf-c++/detail/test_helpers.cpp | 121 201401102341.s0ANf1Bi048476@svn.freebsd.org | 463830 | /base/head/lib/atf/Makefile.inc | 121 201401102356.s0ANu2CJ054768@svn.freebsd.org | 339624 | /ports/head/irc/weechat-devel/Makefile | 1 201401102356.s0ANu2CJ054768@svn.freebsd.org | 339625 | /ports/head/irc/weechat-devel/distinfo | 1 201401102356.s0ANu2CJ054768@svn.freebsd.org | 339627 | /ports/head/irc/weechat-devel/pkg-plist | 1 201401110000.s0B00BZa057272@svn.freebsd.org | 462039 | /base/head/sys/net/netmap_user.h | 1 201401110001.s0B013N0058237@svn.freebsd.org | 459404 | /doc/head/en_US.ISO8859-1/htdocs/administration.xml | 121 201401110001.s0B013N0058237@svn.freebsd.org | 464277 | /doc/head/share/xml/authors.ent | 121 201401110022.s0B0MtAo066982@svn.freebsd.org | 476129 | /ports/head/devel/ChipmunkPhysics/Makefile | 1 201401110022.s0B0MtAo066982@svn.freebsd.org | 476130 | /ports/head/devel/ChipmunkPhysics/distinfo | 1 201401110022.s0B0MtAo066982@svn.freebsd.org | 476132 | /ports/head/devel/ChipmunkPhysics/pkg-plist | 1 201401110027.s0B0RgOb067541@svn.freebsd.org | 312036 | /ports/head/games/pushover/Makefile | 1 201401110050.s0B0oeFK076980@svn.freebsd.org | 156861 | /ports/head/games/neverball/Makefile | 1 201401110052.s0B0q3to078165@svn.freebsd.org | 239440 | /ports/head/graphics/geomorph/Makefile | 1 201401110052.s0B0q3to078165@svn.freebsd.org | 239441 | /ports/head/graphics/geomorph/distinfo | 1 201401110052.s0B0q3to078165@svn.freebsd.org | 239446 | /ports/head/graphics/geomorph/files/patch-src-app-main.c | 1 201401110052.s0B0q3to078165@svn.freebsd.org | 550860 | /ports/head/graphics/geomorph/files/patch-src-hf-view__area.c | 1 201401110052.s0B0q3to078165@svn.freebsd.org | 239448 | /ports/head/graphics/geomorph/pkg-plist | 1 201401110144.s0B1iM0t097549@svn.freebsd.org | 550861 | /base/stable/10/contrib/gcc/combine.c | 124 201401110145.s0B1jKKR097721@svn.freebsd.org | 464102 | /base/stable/9 | 123 201401110145.s0B1jKKR097721@svn.freebsd.org | 465164 | /base/stable/9/contrib/gcc | 123 201401110145.s0B1jKKR097721@svn.freebsd.org | 550862 | /base/stable/9/contrib/gcc/combine.c | 123 201401110150.s0B1oj7B098638@svn.freebsd.org | 464106 | /base/stable/8 | 115 201401110150.s0B1oj7B098638@svn.freebsd.org | 467068 | /base/stable/8/contrib | 115 201401110150.s0B1oj7B098638@svn.freebsd.org | 476707 | /base/stable/8/contrib/gcc | 115 201401110150.s0B1oj7B098638@svn.freebsd.org | 550863 | /base/stable/8/contrib/gcc/combine.c | 115 201401110247.s0B2lUfE021365@svn.freebsd.org | 169244 | /ports/head/textproc/docbook-420/Makefile | 1 201401110249.s0B2nW9Y021658@svn.freebsd.org | 145539 | /ports/head/graphics/wings/Makefile | 1 201401110249.s0B2nW9Y021658@svn.freebsd.org | 145552 | /ports/head/graphics/wings/pkg-plist | 1 201401110314.s0B3E647033659@svn.freebsd.org | 481399 | /base/head/sys/amd64/vmm/intel/vmcs.c | 1 201401110314.s0B3E647033659@svn.freebsd.org | 481405 | /base/head/sys/amd64/vmm/intel/vmx_genassym.c | 1 201401110314.s0B3E647033659@svn.freebsd.org | 481408 | /base/head/sys/amd64/vmm/intel/vmx_support.S | 1 201401110422.s0B4M1Dc060182@svn.freebsd.org | 481400 | /base/head/sys/amd64/vmm/intel/vmcs.h | 1 201401110422.s0B4M1Dc060182@svn.freebsd.org | 481401 | /base/head/sys/amd64/vmm/intel/vmx.c | 1 201401110422.s0B4M1Dc060182@svn.freebsd.org | 481402 | /base/head/sys/amd64/vmm/intel/vmx.h | 1 201401110429.s0B4T6nC061140@svn.freebsd.org | 395056 | /ports/head/textproc/multimarkdown/Makefile | 1 201401110429.s0B4T6nC061140@svn.freebsd.org | 395057 | /ports/head/textproc/multimarkdown/distinfo | 1 201401110633.s0B6X7Nj009042@svn.freebsd.org | 230112 | /ports/head/net-im/licq-qt-gui/Makefile | 1 201401110633.s0B6X7Nj009042@svn.freebsd.org | 230114 | /ports/head/net-im/licq/Makefile | 1 201401110635.s0B6ZTD2009401@svn.freebsd.org | 310904 | /base/head/sys/powerpc/powermac/macgpio.c | 1 201401110635.s0B6ZTD2009401@svn.freebsd.org | 310905 | /base/head/sys/powerpc/powermac/macgpiovar.h | 1 201401110753.s0B7r3hD037907@svn.freebsd.org | 336506 | /base/head/sys/dev/usb/net/uhso.c | 1 201401110753.s0B7r3hD037907@svn.freebsd.org | 318980 | /base/head/sys/dev/usb/serial/u3g.c | 1 201401110756.s0B7uXgk038377@svn.freebsd.org | 420573 | /ports/head/devel/p5-CPAN-Perl-Releases/Makefile | 1 201401110756.s0B7uXgk038377@svn.freebsd.org | 420574 | /ports/head/devel/p5-CPAN-Perl-Releases/distinfo | 1 201401110802.s0B82auZ041848@svn.freebsd.org | 149813 | /ports/head/devel/p5-Module-CoreList/Makefile | 1 201401110802.s0B82auZ041848@svn.freebsd.org | 149814 | /ports/head/devel/p5-Module-CoreList/distinfo | 1 201401110807.s0B87dNS042708@svn.freebsd.org | 72094 | /ports/head/devel/p5-BSD-stat/Makefile | 1 201401110807.s0B87dNS042708@svn.freebsd.org | 72093 | /ports/head/devel/p5-BSD-stat/distinfo | 1 201401110814.s0B8E8Dh046383@svn.freebsd.org | 245831 | /ports/head/devel/p5-Term-UI/Makefile | 1 201401110814.s0B8E8Dh046383@svn.freebsd.org | 245832 | /ports/head/devel/p5-Term-UI/distinfo | 1 201401110816.s0B8GWNU046725@svn.freebsd.org | 354105 | /base/head/sys/dev/usb/controller/xhci.c | 1 201401110819.s0B8JvVJ047149@svn.freebsd.org | 213069 | /ports/head/devel/p5-Test-File/Makefile | 1 201401110819.s0B8JvVJ047149@svn.freebsd.org | 213070 | /ports/head/devel/p5-Test-File/distinfo | 1 201401110821.s0B8LEC4049924@svn.freebsd.org | 533308 | /base/stable/10 | 124 201401110821.s0B8LEC4049924@svn.freebsd.org | 534714 | /base/stable/10/sys/dev/usb/controller/xhci.c | 124 201401110823.s0B8N2jM050209@svn.freebsd.org | 464103 | /base/stable/9/sys | 123 201401110823.s0B8N2jM050209@svn.freebsd.org | 464246 | /base/stable/9/sys/dev | 123 201401110823.s0B8N2jM050209@svn.freebsd.org | 465947 | /base/stable/9/sys/dev/usb/controller/xhci.c | 123 201401110824.s0B8Oqq5050458@svn.freebsd.org | 464107 | /base/stable/8/sys | 115 201401110824.s0B8Oqq5050458@svn.freebsd.org | 464456 | /base/stable/8/sys/dev | 115 201401110824.s0B8Oqq5050458@svn.freebsd.org | 464563 | /base/stable/8/sys/dev/usb | 115 201401110824.s0B8Oqq5050458@svn.freebsd.org | 466337 | /base/stable/8/sys/dev/usb/controller/xhci.c | 115 201401110829.s0B8Tkuo051039@svn.freebsd.org | 249862 | /ports/head/devel/p5-Test-Output/Makefile | 1 201401110829.s0B8Tkuo051039@svn.freebsd.org | 249863 | /ports/head/devel/p5-Test-Output/distinfo | 1 201401110849.s0B8nWcr058462@svn.freebsd.org | 17130 | /ports/head/games/xboard/Makefile | 1 201401110908.s0B98hrA066158@svn.freebsd.org | 183283 | /ports/head/devel/p5-ExtUtils-MakeMaker/Makefile | 1 201401110908.s0B98hrA066158@svn.freebsd.org | 183284 | /ports/head/devel/p5-ExtUtils-MakeMaker/distinfo | 1 201401110922.s0B9MZ3E073273@svn.freebsd.org | 333185 | /ports/head/www/p5-CSS-Inliner/Makefile | 1 201401110922.s0B9MZ3E073273@svn.freebsd.org | 333186 | /ports/head/www/p5-CSS-Inliner/distinfo | 1 201401110931.s0B9VeKT076884@svn.freebsd.org | 201882 | /ports/head/math/coq/Makefile | 1 201401110931.s0B9VeKT076884@svn.freebsd.org | 201883 | /ports/head/math/coq/distinfo | 1 201401110931.s0B9VeKT076884@svn.freebsd.org | 201885 | /ports/head/math/coq/pkg-plist | 1 201401110940.s0B9erM7080149@svn.freebsd.org | 291283 | /ports/head/print/paps/Makefile | 1 201401110944.s0B9i10R080957@svn.freebsd.org | 93893 | /base/head/sbin/route/route.8 | 121 201401110944.s0B9i10R080957@svn.freebsd.org | 135118 | /base/head/usr.bin/netstat/netstat.1 | 121 201401110952.s0B9qdbP084511@svn.freebsd.org | 212948 | /ports/head/print/pdfjam/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 334242 | /ports/head/x11/evilvte/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 334245 | /ports/head/x11/evilvte/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 187278 | /ports/head/x11/gtkterm2/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 46557 | /ports/head/x11/kb2mb2/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 375856 | /ports/head/x11/keybinder/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 375859 | /ports/head/x11/keybinder/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 70480 | /ports/head/x11/keylaunch/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 70479 | /ports/head/x11/keylaunch/files/pkg-message.in | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 70483 | /ports/head/x11/keylaunch/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 323211 | /ports/head/x11/libxdg-basedir/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 458604 | /ports/head/x11/lxrandr/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 458607 | /ports/head/x11/lxrandr/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 420549 | /ports/head/x11/metalock/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 550864 | /ports/head/x11/metalock/files | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 550865 | /ports/head/x11/metalock/files/patch-Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 328063 | /ports/head/x11/ooxcb/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 227210 | /ports/head/x11/p5-Clipboard/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 227213 | /ports/head/x11/p5-Clipboard/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 332164 | /ports/head/x11/p5-X11-Resolution/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 332167 | /ports/head/x11/p5-X11-Resolution/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 368945 | /ports/head/x11/stjerm/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 51463 | /ports/head/x11/sxpc/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 331572 | /ports/head/x11/thingylaunch/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 63829 | /ports/head/x11/wmcliphist/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 550866 | /ports/head/x11/wmcliphist/files/pkg-message.in | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 174700 | /ports/head/x11/wmctrl/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 136566 | /ports/head/x11/wmdrawer/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 136569 | /ports/head/x11/wmdrawer/files/patch-Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 136571 | /ports/head/x11/wmdrawer/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 49721 | /ports/head/x11/xdialog/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 49724 | /ports/head/x11/xdialog/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 282078 | /ports/head/x11/xdotool/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 550867 | /ports/head/x11/xdotool/pkg-plist | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 51471 | /ports/head/x11/xkeywrap/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 201028 | /ports/head/x11/xscreensaver.app/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 284210 | /ports/head/x11/xsel-conrad/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 50226 | /ports/head/x11/xtestpicture/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 337334 | /ports/head/x11/xwinwrap/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 337337 | /ports/head/x11/xwinwrap/files/patch-Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 154396 | /ports/head/x11/yalias/Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 550868 | /ports/head/x11/yalias/files | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 550869 | /ports/head/x11/yalias/files/patch-Makefile | 1 201401111003.s0BA3jMm089284@svn.freebsd.org | 154399 | /ports/head/x11/yalias/pkg-plist | 1 201401111008.s0BA8PAj090138@svn.freebsd.org | 157090 | /ports/head/security/gsasl/pkg-plist | 1 201401111011.s0BABcpp093346@svn.freebsd.org | 157085 | /ports/head/security/gsasl/Makefile | 1 201401111028.s0BASei8097932@svn.freebsd.org | 370685 | /ports/head/audio/libumidi/Makefile | 1 201401111028.s0BASei8097932@svn.freebsd.org | 370686 | /ports/head/audio/libumidi/distinfo | 1 201401111047.s0BAlqfE005439@svn.freebsd.org | 542725 | /doc/head/en_US.ISO8859-1/htdocs/news/status/report-2013-10-2013-12.xml | 1 201401111104.s0BB45Kq012537@svn.freebsd.org | 409656 | /ports/head/textproc/igor/Makefile | 1 201401111105.s0BB5ZRA012825@svn.freebsd.org | 370690 | /ports/head/audio/midipp/Makefile | 1 201401111105.s0BB5ZRA012825@svn.freebsd.org | 370691 | /ports/head/audio/midipp/distinfo | 1 201401111156.s0BBuqHa031514@svn.freebsd.org | 223026 | /ports/head/converters/p5-JSON/Makefile | 1 201401111156.s0BBuqHa031514@svn.freebsd.org | 223027 | /ports/head/converters/p5-JSON/distinfo | 1 201401111201.s0BC1fbh034838@svn.freebsd.org | 156086 | /ports/head/security/shishi/Makefile | 1 201401111201.s0BC1fbh034838@svn.freebsd.org | 156091 | /ports/head/security/shishi/pkg-plist | 1 201401111202.s0BC2kCt035078@svn.freebsd.org | 157078 | /ports/head/security/gss/Makefile | 1 201401111202.s0BC2kCt035078@svn.freebsd.org | 157083 | /ports/head/security/gss/pkg-plist | 1 201401111222.s0BCMGf9042862@svn.freebsd.org | 55527 | /ports/head/security/mcrypt/Makefile | 1 201401111222.s0BCMGf9042862@svn.freebsd.org | 550870 | /ports/head/security/mcrypt/pkg-plist | 1 201401111243.s0BChwCp050263@svn.freebsd.org | 460484 | /doc/head/ja_JP.eucJP/share/xml/news.xml | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 174832 | /ports/head/x11-clocks/alltraxclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 657 | /ports/head/x11-clocks/astime/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 550875 | /ports/head/x11-clocks/astime/files/patch-aa | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 198842 | /ports/head/x11-clocks/astzclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 51480 | /ports/head/x11-clocks/bclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 51481 | /ports/head/x11-clocks/dclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 38040 | /ports/head/x11-clocks/emiclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 54063 | /ports/head/x11-clocks/emiclock/pkg-plist | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 49785 | /ports/head/x11-clocks/mlclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 91817 | /ports/head/x11-clocks/mouseclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 205181 | /ports/head/x11-clocks/osdclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 550871 | /ports/head/x11-clocks/osdclock/files/patch-Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 6842 | /ports/head/x11-clocks/swisswatch/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 550876 | /ports/head/x11-clocks/swisswatch/pkg-plist | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 43173 | /ports/head/x11-clocks/t3d/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 51483 | /ports/head/x11-clocks/tclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 243849 | /ports/head/x11-clocks/tktz/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 550872 | /ports/head/x11-clocks/tktz/files | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 550873 | /ports/head/x11-clocks/tktz/files/patch-tktz | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 171824 | /ports/head/x11-clocks/wmbday/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 171829 | /ports/head/x11-clocks/wmbday/pkg-plist | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 144948 | /ports/head/x11-clocks/wmbinclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 138387 | /ports/head/x11-clocks/wmblueclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 11609 | /ports/head/x11-clocks/wmcalclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 499607 | /ports/head/x11-clocks/wmcalclock/files/patch-Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 60185 | /ports/head/x11-clocks/wmclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 112047 | /ports/head/x11-clocks/wmclockmon/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 112053 | /ports/head/x11-clocks/wmclockmon/pkg-plist | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 56950 | /ports/head/x11-clocks/wmfishtime/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 106062 | /ports/head/x11-clocks/wmfuzzy/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 58693 | /ports/head/x11-clocks/wmtimer/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 51485 | /ports/head/x11-clocks/xdaliclock/Makefile | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 38349 | /ports/head/x11-clocks/xdaliclock/files | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 550874 | /ports/head/x11-clocks/xdaliclock/files/patch-Makefile.in | 1 201401111251.s0BCpWlN054309@svn.freebsd.org | 51486 | /ports/head/x11-clocks/xtimer/Makefile | 1 201401111252.s0BCq7Ur054448@svn.freebsd.org | 460309 | /doc/head/ja_JP.eucJP/htdocs/internal/machines.xml | 1 201401111332.s0BDWZWA069661@svn.freebsd.org | 531571 | /ports/head/games/capicity/Makefile | 1 201401111335.s0BDZaFU070072@svn.freebsd.org | 95875 | /base/head/sys/cam/cam_periph.c | 1 201401111335.s0BDZaFU070072@svn.freebsd.org | 133673 | /base/head/sys/cam/cam_periph.h | 1 201401111335.s0BDZaFU070072@svn.freebsd.org | 82561 | /base/head/sys/cam/cam_xpt.c | 1 201401111335.s0BDZaFU070072@svn.freebsd.org | 327907 | /base/head/sys/cam/scsi/scsi_xpt.c | 1 201401111412.s0BEC417085448@svn.freebsd.org | 319254 | /ports/head/astro/josm/Makefile | 1 201401111412.s0BEC417085448@svn.freebsd.org | 319255 | /ports/head/astro/josm/distinfo | 1 (275 rows) freshports.org=#
What branches were those commits against:
freshports.org=# select * from system_branch SB where SB.id in (1, 12, 121, 123, 124, 115); id | system_id | branch_name -----+-----------+------------- 1 | 1 | HEAD 12 | 1 | OpenBSD 115 | 1 | RELENG_8 121 | 1 | UNKNOWN 123 | 1 | RELENG_9 124 | 1 | RELENG_10 (6 rows) freshports.org=#
The only concern there is the 121 branch…
Let’s look at one of those commits, the one by bapt, against. Looking at the original svn email, I see:
From: Baptiste DaroussinDate: Fri, 10 Jan 2014 16:09:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r339364 - in head: devel/lua-lgi devel/lua-lgi/files x11-wm/awesome
Compare that to this commit, which was processed against the correct branch, HEAD:
From: Dmitry MarakasovDate: Sat, 11 Jan 2014 14:12:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r339426 - head/astro/josm
Do you see the difference in the subject? ‘in head:’ versus ‘head’?
That’s the cause of the UNKNOWN branch issue. The perl code is looking for the latter, not the former.
sub GetOS_Branch { my ($message) = @_; my ($branch); my (@lines) = split("\n", $message); for (@lines) { next unless ($_ =~ /^Subject: /i); if (m@\s+head/@) { $branch = "HEAD"; } elsif (m@\s+stable/(\d+)@) { $branch = "RELENG_$1"; } elsif (m@\s+vendor/@) { $branch = "VENDOR"; } else { $branch = "UNKNOWN"; } last; } return $branch; }
I could change the source code, but why is the subject in the email different?
It could be because the commit affects more than one port. Look at this commit, which covers 24 ports:
From: "Vanilla I. Shu"Date: Sat, 11 Jan 2014 12:51:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r339424 - in head/x11-clocks: alltraxclock astime astime/files astzclock bclock dclock emiclock mlclock mouseclock osdclock osdclock/files swisswatch t3d tclock tktz tktz/files wmbday w...
OK, that *seems* to be it.
Let’s look at the subjects of the other commit emails:
freshports.org=# SELECT distinct CL.message_id, CL.message_subject, SBER.system_branch_id FROM commit_log CL, commit_log_elements CLE LEFT OUTER JOIN system_branch_element_revision SBER on CLE.revision_name = SBER.revision_name WHERE CLE.commit_log_id = CL.id AND CLE.element_id = SBER.element_id AND CL.date_added > now() - interval E'24 hours' AND SBER.system_branch_id = 121 ORDER BY CL.message_id; message_id | message_subject | system_branch_id ---------------------------------------------+---------------------------------------------------------------------+------------------ 201401101609.s0AG9BsC074674@svn.freebsd.org | svn commit: r339364 - in head: devel/lua-lgi devel/lua-lgi/files | 121 201401101656.s0AGuxNV093545@svn.freebsd.org | svn commit: r260517 - | 121 201401101740.s0AHeUmL010180@svn.freebsd.org | svn commit: r260518 - | 121 201401102237.s0AMb6qP024423@svn.freebsd.org | svn commit: r43468 - in head: en_US.ISO8859-1/articles/contributors | 121 201401102308.s0AN8I4G036239@svn.freebsd.org | svn commit: r260524 - in head: sbin/route usr.bin/netstat | 121 201401102338.s0ANcX15047582@svn.freebsd.org | svn commit: r260525 - in head: etc/mtree lib/atf/libatf-c++/tests | 121 201401102341.s0ANf1Bi048476@svn.freebsd.org | svn commit: r260526 - in head: contrib/atf/atf-c++/detail lib/atf | 121 201401110001.s0B013N0058237@svn.freebsd.org | svn commit: r43469 - in head: en_US.ISO8859-1/htdocs share/xml | 121 201401110944.s0B9i10R080957@svn.freebsd.org | svn commit: r260540 - in head: sbin/route usr.bin/netstat | 121 (9 rows) freshports.org=#
OK, I think that confirms the issue as a parsing problem. The emails in question are not what FreshPorts is expecting.
You will notice that two commits listed above have nothing to indicate the branch. If you look at the raw email for each commit, you will see the problem:
From: Alan SomersDate: Fri, 10 Jan 2014 17:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260518 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
The subject spans multiple lines. FreshPorts is not catering for this at all.
I should get some confirmation from ports@ before I proceed.
If you know the fix for the perl code, please let me know.
zi said:
I tested it. This works for commits to multiple ports:
I decided to go with this for now:
This does not solve the problem of multiple-line Subject: clauses.
I think I have a solution for the multi-line Subject: Email-Simple
Here is the test I did:
Here is part of the output of the test:
As you can see, the new code grabs the full subject. The old code (as seen in the MESSAGE node) did not.