{"thread":{"id":"9248","subject":"incremental fast-import","startedAt":"2007-07-26T21:47:20Z","lastAt":"2007-07-27T07:44:19Z","messageCount":3,"participants":["Julian Phillips","Shawn O. Pearce","Simon 'corecode' Schubert"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48742","messageId":"Pine.LNX.4.64.0707262242460.14017@beast.quantumfyre.co.uk","threadId":"9248","inReplyTo":null,"subject":"incremental fast-import","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-07-26T21:47:20Z","receivedAt":"2007-07-26T21:47:20Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"Sorry to be going on about fast-import again ...\n\nI seem to be missing something though.  I can't seem to get it to work \nwhen run in an incremental manner.\n\nI have a saved stream of fast-import commands.  Every time I run this \nthrough fast import I get the exact same marks file out.  This is good.\n\nHowever if I feed it in in two chunks, then nearly all of the SHA1s \ngenerated in the second run are different to those produced in a single \npass.  In addition I get a pair of \"warning: Not updating \nrefs/heads/BUG_101_BRANCH (new tip <some sha1> does not contain <other \nsha1>)\" messages.  This is not so good.\n\nI'm using the --import-marks and --export-marks options.  Is there \nsomething else I need to do to be able to run fast-import in an \nincremental manner?\n\n-- \nJulian\n\n  ---\nA fool must now and then be right by chance.\n"},{"id":"48748","messageId":"20070727005103.GC20052@spearce.org","threadId":"9248","inReplyTo":"Pine.LNX.4.64.0707262242460.14017@beast.quantumfyre.co.uk","subject":"Re: incremental fast-import","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-07-27T00:51:03Z","receivedAt":"2007-07-27T00:51:03Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Julian Phillips <julian@quantumfyre.co.uk> wrote:\n> I seem to be missing something though.  I can't seem to get it to work \n> when run in an incremental manner.\n> \n> I have a saved stream of fast-import commands.  Every time I run this \n> through fast import I get the exact same marks file out.  This is good.\n> \n> However if I feed it in in two chunks, then nearly all of the SHA1s \n> generated in the second run are different to those produced in a single \n> pass.  In addition I get a pair of \"warning: Not updating \n> refs/heads/BUG_101_BRANCH (new tip <some sha1> does not contain <other \n> sha1>)\" messages.  This is not so good.\n> \n> I'm using the --import-marks and --export-marks options.  Is there \n> something else I need to do to be able to run fast-import in an \n> incremental manner?\n\nI'm guessing you didn't restart the branches at the start of the\nsecond import.  You need to do something like this to get the import\ngoing again:\n\n  commit refs/heads/BUG_101_BRANCH\n  from refs/heads/BUG_101_BRANCH^0\n  ...\n\nor because you imported the marks you can use a mark:\n\n  commit refs/heads/BUG_101_BRANCH\n  from :18981\n  ...\n\nwhere 18981 was the last revision on BUG_101_BRANCH that the frontend\nhad imported during the last run.\n\n\nfast-import doesn't assume the local branches already exist.\nIt actually assumes its importing from scratch every time.  The\nfrontend tool needs to restart the branch if that is what it wants.\n\nIn other words, by splitting the file in half you actually also\nsplit the history in half, and got two root commits, one of which\nwas in the middle of your history.  :-(\n\n-- \nShawn.\n"},{"id":"48778","messageId":"46A9A253.8000602@fs.ei.tum.de","threadId":"9248","inReplyTo":"20070727005103.GC20052@spearce.org","subject":"Re: incremental fast-import","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2007-07-27T07:44:19Z","receivedAt":"2007-07-27T07:44:19Z","isPatch":false,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"Shawn O. Pearce wrote:\n> fast-import doesn't assume the local branches already exist.\n> It actually assumes its importing from scratch every time.  The\n> frontend tool needs to restart the branch if that is what it wants.\n\nIs there a compelling reason for this behavior?  Shouldn't be so complicated to get an overview on which branches already exist?\n\nRight now I have to do this with a side channel to fast-import, asking the git repo directly, and then \"recreating\" the branch, etc.  Works, but could be nicer, I guess.\n\ncheers\n  simon\n\n-- \nServe - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /\"\\\nWork - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \\ /\nParty Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \\\nDude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \\\n"}]}