{"thread":{"id":"20642","subject":"rev-list behavior in mail notification when pushing multiple branches","startedAt":"2009-08-17T16:13:32Z","lastAt":"2009-08-17T16:13:32Z","messageCount":1,"participants":["Tim Niemueller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"120920","messageId":"4A8981AC.20703@kbsg.rwth-aachen.de","threadId":"20642","inReplyTo":null,"subject":"rev-list behavior in mail notification when pushing multiple branches","fromName":"Tim Niemueller","fromEmail":"niemueller@kbsg.rwth-aachen.de","sentAt":"2009-08-17T16:13:32Z","receivedAt":"2009-08-17T16:13:32Z","isPatch":false,"sender":{"key":"niemueller@kbsg.rwth-aachen.de","avatar":null},"body":"Hi.\n\nWe are using git to manage a project which is separated in multiple\nrepositories. We use email notification for commits to the central\nrepositories, but the log output in these mails is not what we expect.\nWe use the contrib hook script from the git repository.\n\nThe main repository contains the trunk, in the real sense, meaning that\nit is composed of infrastructure code shared among all repositories, not\nin the svn sense. The other repositories contain the trunk master branch\nas \"trunk\" branch. Their own master branch is based on trunk, but\nextended by additional modules. We regularly merge from the main\nrepository into the other repositories trunk.\n\nConsider the following situation:\n\n--*---X-------Y     master branch\n     /       /\nA---B--C*---D       trunk branch\n\nmaster has been ultimately derived from trunk. At X trunk changes up to\nC have been merged into the master. Then trunk evolves but master\nremains unchanged. We merge again everything up to D from trunk. Now\nassume that we haven't pushed since B/X and now push after D/Y. Then\nthere are two mails to be generated, one for master X..Y, effectively\ncontaining log message Y (merged...), and one for trunk B..D, C* is any\nnumber of intermediate commits to the trunk.\n\nIt happens to be that master has been pushed first. The email contains\nthe expected output in the log section. However, for the trunk branch\nthe output unexpectedly is empty, meaning that information about C* is\nnever send in any mail.\n\nThe reason is the following: in show_new_revisions \"rev-parse --not\" is\nused to generate \"stop\" points for rev-list. The stop point issued for\nthe master branch is Y. This causes rev-list to stop immediately, since\nthis is the last commit in the chronological order.\n\nWhat we would like to have is the that the master mail only states\n\"merged trunk changes\" (as it is right now, if there were commits\nbetween X and Y these should be included as well), while the trunk mail\nissues all C* commits and D.\n\nI have tried to come up with a way to filter out entries from the mails\nthat have been issued on \"the other\" branch(es) originally (although\nthey are now /after/ merging also part of the this branch's history).\nSince gitk can show this there should be a way to figure it out, but my\ngit-fu isn't strong enough, yet. Can someone give advice on how to\nachieve this, or how you solved the problem, if you did?\n\nThanks,\n\tTim\n\n-- \nAllemaniACs RoboCup Team            KBSG - Knowledge-Based Systems Group\n========================================================================\nhttp://robocup.rwth-aachen.de                     RWTH Aachen University\nhttp://www.kbsg.rwth-aachen.de                           Ahornstrasse 55\nhttp://www.fawkesrobotics.org                             D-52056 Aachen\n"}]}