Artifact
db8c219c929e1945b30dd2b38c60b6787d5a0a8f:
Ticket change
[db8c219c92]
- Ticket [e0352240ad]
Support for importing vendor source status still Open with 1 other change
by
wolfgang
2010-10-14 18:47:22.
D 2010-10-14T18:47:22
J comment When\stracking\sthird\sparty\ssoftware\sin\sFossil,\sI\swant\sto\shave\sbetter\ssupport\sfor\schecking\sexternal\ssource\sin\sin\sfull.\r\n\r\nHandling\sit\smanually\sis\stiresome:\r\n<pre>\r\nfossil\sopen\s~/repo/project\svendor\s--keep\r\nfossil\sadd\s$(fossil\sextras\s--dotfiles)\r\nfossil\srm\s$(fossil\schanges\s|\sawk\s'$1\s==\s"MISSING"\s{print\s$2}'\r\nfossil\sci\s-m\s"Import\svendor\sversion\s6.6.6"\r\n</pre>\r\nThe\sshell\smagic\sis\serror-prone,\sit\sworks\sbadly\swith\sfiles\scontaining\swhite\sspace\sin\snames,\sit\sis\sgood\sluck\sI\shaven't\srun\sinto\sproblems\syet.\r\n\r\nI\spropose\sto\screate\ssome\s"import"\scommand\sthat\ssynchronizes\sinventory\swith\sfile\ssystem.\r\n\r\n<hr\s/><i>anonymous\sadded\son\s2010-10-13\s13:26:02:</i><br\s/>\r\nI\ssupport\sthis.\sThe\simport\scommand\sshould\salso\sadd\sa\snon-propagating\stag\slike\sCVS\sdoes\sto\smake\sit\seasier\sto\skeep\sthat\sof\swhat\sversion\swas\simported.\r\n\r\n<hr\s/><i>wolfgang\sadded\son\s2010-10-13\s19:44:04:</i><br\s/>\r\nI\shave\sadded\san\sexperimental\sIMPORT\scommand\sto\smy\sbranch\swolfgangHelpCmd\s(checkin\s[b37d5f256e]).\r\n\r\nMaybe\syou\stake\sa\slook\sat\sit\sand/or\stest\sit\sin\syour\senvironment.\r\n\r\nThe\scommand\shelp\sis:\r\n\r\n<pre>\r\nUsage:\sfossil.exe\simport\r\n\r\nIf\sused\sin\sa\scheckout,\sthe\scurrent\scheckout\sfile\stree\sis\ssynchronized\r\nwith\sthe\srepository:\r\n\s*\sall\sfiles,\sexisting\sin\sthe\sfile\stree\sbut\snot\sin\sthe\srepository\r\n\s\s\s(files\sdisplayed\susing\sthe\s"extra"\scommand)\r\n\s\s\sare\sadded\sto\sthe\srepository\s-\ssee\salso\s"add"\r\n\s*\sall\sfiles,\sexisting\sin\sthe\srepository,\snot\sexisting\sin\sthe\sfile\stree\r\n\s\s\s(files\sdisplayed\sas\sMISSING\susing\sthe\s"status"\scommand)\r\n\s\s\sare\sremoved\sfrom\sthe\srepository\s-\ssee\salso\s"rm"\r\nThe\scommand\sdoes\snot\s"commit"!\r\n\r\nThis\scommand\scan\sbe\sused\sto\strack\sthird\sparty\ssoftware.\r\n</pre>\r\n\r\nbest\sregards\r\nWolfgang\r\n\r\n<hr\s/><i>anonymous\sclaiming\sto\sbe\sJoerg\sSonnenberger\sadded\son\s2010-10-13\s21:38:34:</i><br\s/>\r\nWell,\scoming\sfrom\sthe\scvs\smodel,\seffective\s3rd\sparty\smanagement\sincludes:\r\n\r\n(1)\sA\sseparate\sbranch\swith\sthe\sunmodified\ssources\sin\sa\sspecific\slocation.\r\nIdeally,\sthe\simport\scommand\sdoes\sa\ssanity\scheck\sthat\sthe\s"vendor"\sbranch\sdoesn't\scontain\sanything\selse.\r\n\r\n(2)\sA\ssymbol\sfor\seach\seach\simported\sversion.\sNormally,\sthis\sis\sthe\srelease\sversion\sfrom\supstream\sor\sthe\scommit\sid\sor\swhatever.\sThis\sshould\sbe\sa\snon-propagating\stag.\r\n\r\n(3)\sA\smerge\sfrom\sthe\svendor\sbranch\sto\strunk.\sAs\sfossil\skeeps\strack\sof\sthe\smerge\sstate,\sthis\sis\seasier\sthan\swith\scvs,\swhere\sit\shad\sto\sbe\ssimulated\swith\scvs\sup\s-j\sold-tag\s-j\snew-tag.\r\n\r\nA\sreally\suseful\s"fossil\simport"\swould\stherefore\sbe:\r\n\r\n\s\s\s\sfossil\simport\sREPOSITORY\sPATH\sBRANCH\sTAG\r\n\r\nand\snot\srequire\sa\scheckout\sof\sthe\sproper\sbranch.\sThe\smerge\spart\sis\seasy\senough\sto\sdo\swith\sthe\snormal\smerge\sprocessing\sand\scan\sbe\sskipped.\r\n\r\n<hr\s/><i>anonymous\sadded\son\s2010-10-14\s07:54:40:</i><br\s/>\r\nSeparate\sbranch\sis\seasy\sto\screate\syourself,\sthe\sproblem\sis\sthat\syou\scan't\smerge\sfrom\sit\seven\sto\sempty\strunk:\r\n<pre>\r\n$\sfossil\smerge\svendor\r\nfossil:\slack\sboth\sprimary\sand\ssecondary\sfiles\r\n</pre>\r\nPerhaps\sthis\sshould\sbe\sfixed\stoo.\r\n\r\nA\ssymbol\sfor\seach\sversion\sisn't\sneeded,\syou\shave\sversion\sidentifiers\salready,\r\nand\syou\scan\salways\stag\swhat\syou\swant.\r\n\r\n\r\n<hr\s/><i>wolfgang\sadded\son\s2010-10-14\s10:20:26:</i><br\s/>\r\nI\sthink\s-\slike\smentioned\sabove\s-\screating\sa\sbranch\sand\stag\swith\sproper\svendaor\stags\scan\salready\sbe\sdone\susing\sthe\sstandard\sfossil\scommands.\r\n\r\nThe\smain\sproblem,\sdeescribed\sat\sthe\sbeginning\swas\sthe\ssync\sof\sthe\scheckout\sfile\stree\sand\sthe\sfiles\sin\sthe\srepository.\sThis\scan\sbe\shanlded\swith\sthe\snew\scommen.\r\n\r\nWould\sthe\smerge\swork,\sif\swe\suse\sthe\scherrypicck\soption?\sI\scannot\stest\sit\snow,\sbut\si'll\stry\sit\slater\sand\si\sthink,\sit\swill\swork.\r\n\r\nThe\sonly\sproblem,\swe\smay\shave\sis\sthe\sfact,\sthat\sthe\simport\scommand\sneeds\sto\sbe\scalled\sfrom\san\sceckout.\sThe\snew\scommand\sshares\smost\sof\sits\scode\swithalready\sexitant\scode\sfor\sadd/extras/rm\sand\sall\sthese\sccommands\sare\sonly\simplemented,\swhen\scalled\sfrom\san\sexisting\scheckout.\s\r\nIt\swill\sbe\scomplex\sto\sextendd\sit\sto\swork\swith\sstandalone\scheckouts,\sand\si\sdon't\sbelieve,\sthat\sit's\sneccesary:\r\n\r\n\s\s*\s\sFirst\scheckin:<br>fossil\snew\sx.fsl;mkdir\sx;cd\sx;fossil\sopen\s..\\x.fsl<br>\r\n\s\s\s\s\scopy\ssource\stree\sto\sx<br>fossil\simport<br>fossil\scommit\s-m\s"..."<br>and\r\n\s\s\s\s\sset\sbranches/tagss\sto\swhatever\syou\swant\r\n\s\s*\s\sfurther\scheckins:<br>cd\sx;fossil\supdate\sVENDORBRANCH<br>\r\n\s\s\s\s\sremove\sold\sdata\sand\scopy\snew\ssource\stree<br>\r\n\s\s\s\s\sfossil\simport;fossil\scommit\s-m\s".."\r\n\r\nMerging\sto\smain\sdevelopment\sbranch\sshould\sbe\spossible\sby\susing\scherrypick\r\n\r\nbest\sregards\r\n\r\nWolfgang\r\n\r\n<hr\s/><i>anonymous\sclaiming\sto\sbe\sJoerg\sSonnenberger\sadded\son\s2010-10-14\s10:41:57:</i><br\s/>\r\nRe\stagging\sthe\simport:\r\n\r\nI've\shad\sto\sdeal\swith\svendor\simports\sthat\soften\senough\slack\sany\sversion\snumber\sother\sthan\ssome\sRCS\sids\sin\sthe\sfile.\sImporting\sfiles\sdirectly\sfrom\sthe\supstream\sversion\scontrol\ssystem\sis\sa\scommon\stask\sfor\slarger\sprojects.\sSadly\senough,\shaving\sto\sidentify\swhat\schanged\sbetween\sdifferent\simports\sis\salso\soften\senough\srequired.\r\n\r\nRe\smain\sproblem:\r\n\r\nI\sconsider\s"import"\sa\sconvenience\scommand.\sThe\soriginal\sset\sof\scommands\scan\sbe\ssimplified\sa\slot\sby\sremoving\sall\sfiles\sfirst\swith\sfind\s.\s-type\sf\s-print0\s|\sxargs\s-0\sfossil\srm,\scopying\sthe\snew\sfiles\sand\sdoing\sfind\s.\s-type\sf\s-print0\s|\sxargs\s-0\sfossil\sadd.\sThat's\ssafe\sfor\sspaces\sin\snames\setc.\sHaving\sto\sswitch\sto\sthe\svendor\sbranch\srequires\seither\screating\sanother\scheckout\sand\scopying\sfiles\sor\sswitching\sfrom\sa\slarge\scheckout\sto\sa\sminimal\sone.\sThe\slatter\sisn't\sa\slot\sof\sfun\sif\syou\shave\sa\sworking\scopy\ssize\sof\s>\s100MB\sand\suncommitted\schanges.\r\n\r\nNot\shaving\sto\smove\sthe\svendor\sbranch\shas\sanother\svery\sproperty,\sit\sreduces\sthe\schance\sof\saccidentally\smessing\sit\sup.\r\n\r\nRe\sfossil\smerge\sfailure:\r\n\r\nThis\slooks\slike\sa\sbug.\sMerging\sto\sthe\sinitial\sempty\sversion\sshould\scertainly\sbe\sallowed\sas\sspecial\scase.\sIt\sworks\sfine\sif\sany\scommit\swas\sdone\son\strunk\sfirst.\r\n\r\n<hr\s/><i>wolfgang\sadded\son\s2010-10-14\s13:30:13:</i><br\s/>\r\nFollowing\smy\sproposol,\syou\scould\ssee\sany\schanges\sbetween\sdifferent\simports.\sThough\swe\sadd/remove\sonly\ssome\sof\sthe\sfile,\sthe\scommit\swill\salso\strack\sthe\sdifferences\sbetween\schanged\sfiles.\sCreating\sa\svendor\sbranch\son\sthe\sfirst\simport\sand\susing\sa\stag\slike\sVENDOR_1\sand\susing\snew\stags\son\sthis\sbranch\sfor\sfollowing\simport\s(like\sVENDOR_2).\sAll\schanges\s(new/rm\sand\schange)\scan\sbe\sseen\susing\s"fossil\sdiff\s--from\sVENDOR_1\s--to\sVENDOR_2".\sAs\slong,\sas\swe\suse\sthe\svendor\sbranch\sonly\sfor\sthe\scheckin's,\swe\scan\salso\ssee\sthem\sin\sthe\sgui.\r\n\r\nThe\simport\scommand\sis\suseful\son\sOS\s!=\s*nix.\sOn\swindows,\sscripting\sthese\scommands\sis\sa\slittle\sbit\stricky.\sBecause\sadd/extras\scan\swork\srecursiv,\si\sthink\sit's\sa\sgood\sextension,\sto\soffer\sthe\smixed\scomman\simport.\r\n\r\nI\swould\salways\suse\smultiple\scheckouts,\sto\shandle\svenddor\simports\s-\son\sthe\svendor\sbranch\s-\sand\sdevelopment\s-\smain\strunk\sor\sdevelopment\sbranch.\s\r\n\r\n<hr\s/><i>anonymous\sadded\son\s2010-10-14\s14:03:04:</i><br\s/>\r\nMerge\sbug\sfiled\sseparatly\sas\s144180bf7db83724a9c647c60a411512cf605e50\r\nTest\scase\sprovided.\r\n\r\n<hr\s/><i>anonymous\sclaiming\sto\sbe\sJoerg\sSonnenberger\sadded\son\s2010-10-14\s14:11:54:</i><br\s/>\r\nIf\syou\sjust\swant\sto\ssynchronize\sthe\sfile\slist\swith\sthe\sworking\scopy,\sa\sbetter\scommand\swould\sbe\sto\sadopt\sMercurial's\saddremove.\r\n\r\nI\smaintain\sthat\shaving\sto\suse\sa\sseparate\sworking\scopy\sfor\sdoing\svendor\simports\sis\sa\sPITA.\r\n\r\n<hr\s/><i>wolfgang\sadded\son\s2010-10-14\s18:36:16:</i><br\s/>\r\nThe\snew\simport\sprogram\sworks\slike\s"mercurial\saddremove",\sso\si\sthink,\si\sshould\srename\sthe\scommand.\r\n\r\nI've\sstarted\sa\ssmall\stest\srepository\son\schiselapp.com:\r\n\s\s*\s\s[http://chiselapp.com/user/wst/repository/import-vendor-test]\r\n\s\s*\s\suse\suser/password\sd/d\sto\splay\swith\sit.\r\n\r\nimport/addremove\sand\smerging\swith\scherrypick\sseems\sto\swork\sfine\sfor\sme.\r\n\r\nBut\si\scan\ssee\ssome\sproblems/weak\spoints:\r\n\s\s*\s\simporting\sa\snew\sdelivery\sneeds\sto\sremove\sunused\sfile\sfrom\sthe\ssource\stree.\r\n\s\s\s\s\sFor\sbig\sprojects,\sthis\smight\sonly\sbe\sdone\sby\sdeleting\sthe\scomplete\stree\r\n\s\s*\s\sif\sthe\sdevelopment\sbranch\sis\smessed\sup\swith\stemporary\sfiles,\swhich\sare\r\n\s\s\s\s\snot\sunder\sversion\scontrol,\sit's\sdifficult\sto\sremove\sthem\r\n\r\nThis\scould\sonly\sbe\sdone,\susing\sa\simport\sdirectory\soutside\sof\sthe\scheckout.\r\n\r\nMerging\sis\sOK\sfor\sme.\r\n\r\nConclusion:\r\n\s\s*\s\sI'll\srename\simport\sto\saddremove\r\n\s\s*\s\sI'll\sanalyse\sthe\scode,\show\sto\sdo\sa\sadd/remove\sfrom\soutside\sa\srepository.\r\n\s\s\s\s\sBut\sthis\swill\sbe\sdifficult,\sbecause\si\scannot\suse\sexisting\scode.\sBut\si\r\n\s\s\s\s\sthink,\sit\swill\sbe\seasier\sto\sadd\san\soption\s--keep\sto\supdate(like\sfor\sopen).\r\n\s\s\s\s\sSo\swe\scould<br>\r\n\s\s\s\s\s1.\screate\sa\snew\sdirectory\sfor\sthe\sdelivery<br>\r\n\s\s\s\s\s2.\sgo\sto\sthis\sdirectory\sand\sopen\sa\sfossil\sconnection\swith\s--keep<br>\r\n\s\s\s\s\s3.\supdate\sthis\s<i>checkout</i>\sto\sVENDOR\swithout\saffecting\sthe\sfile\susing\r\n\s\s\s\s\s\s\s\s--keep<br>\r\n\s\s\s\s\s4.\scommit\sand\stag\sthe\snew\scheckin\swith\sVENDOR_n+1
K e0352240adeafd4d4d8d297c2141dacf076507b7
U wolfgang
Z 277f49943a8bda2732f5e004ccc20669