{"thread":{"id":"31025","subject":"bzr->git: keep empty directories","startedAt":"2012-07-14T14:41:04Z","lastAt":"2012-07-15T04:01:38Z","messageCount":3,"participants":["Felix Natter","David Aguilar","Steven Michalske"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"195049","messageId":"87sjcuz9q7.fsf@bitburger.home.felix","threadId":"31025","inReplyTo":null,"subject":"bzr->git: keep empty directories","fromName":"Felix Natter","fromEmail":"fnatter@gmx.net","sentAt":"2012-07-14T14:41:04Z","receivedAt":"2012-07-14T14:41:04Z","isPatch":false,"sender":{"key":"fnatter@gmx.net","avatar":null},"body":"hello,\n\nwhen converting a repo from bzr to git:\n\nmkdir freeplane-git1\ncd freeplane-git1\ngit init .\nbzr fast-export --plain --export-marks=../marks.bzr ../trunk/ | git fast-import --export-marks=../marks.git\ngit checkout\n\nEmpty directories are not contained in the git working index. This is\nbecause of the --plain option, which \"Excludes metadata to maximise\ninteroperability\" and thus does not support empty directories\n(http://doc.bazaar.canonical.com/plugins/en/fastimport-plugin.html).\n\nHowever, when I use \"--no-plain\" (which according to above documentation\nexports empty directories), git cannot handle it:\n\n$ ./freeplane2git.sh \nInitialized empty Git repository in /home/felix/git/freeplane-git1/.git/\n15:56:09 Calculating the revisions to include ...\n15:56:09 Starting export of 4290 revisions ...\nfatal: This version of fast-import does not support feature commit-properties.\nfast-import: dumping crash report to .git/fast_import_crash_3915\nbzr: broken pipe\n\nI already tried to hack bzr-fastimport's exporter.py so that it does not\nemit commit properties but emits empty directories but i was not\nsuccessful.\n\nSo is there another way to preserve empty directories or shall I report\na bug on bzr fast-export?\n\nMany thanks in advance!\n-- \nFelix Natter\n"},{"id":"195066","messageId":"CAJDDKr5V++TtS24D=SsaPnkx==Zo8=fpvg2RNod9+-JGxWfhGQ@mail.gmail.com","threadId":"31025","inReplyTo":"87sjcuz9q7.fsf@bitburger.home.felix","subject":"Re: bzr->git: keep empty directories","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2012-07-14T22:46:11Z","receivedAt":"2012-07-14T22:46:11Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Sat, Jul 14, 2012 at 7:41 AM, Felix Natter <fnatter@gmx.net> wrote:\n> hello,\n>\n> when converting a repo from bzr to git:\n>\n> mkdir freeplane-git1\n> cd freeplane-git1\n> git init .\n> bzr fast-export --plain --export-marks=../marks.bzr ../trunk/ | git fast-import --export-marks=../marks.git\n> git checkout\n>\n> Empty directories are not contained in the git working index. This is\n> because of the --plain option, which \"Excludes metadata to maximise\n> interoperability\" and thus does not support empty directories\n> (http://doc.bazaar.canonical.com/plugins/en/fastimport-plugin.html).\n>\n> However, when I use \"--no-plain\" (which according to above documentation\n> exports empty directories), git cannot handle it:\n>\n> $ ./freeplane2git.sh\n> Initialized empty Git repository in /home/felix/git/freeplane-git1/.git/\n> 15:56:09 Calculating the revisions to include ...\n> 15:56:09 Starting export of 4290 revisions ...\n> fatal: This version of fast-import does not support feature commit-properties.\n> fast-import: dumping crash report to .git/fast_import_crash_3915\n> bzr: broken pipe\n>\n> I already tried to hack bzr-fastimport's exporter.py so that it does not\n> emit commit properties but emits empty directories but i was not\n> successful.\n>\n> So is there another way to preserve empty directories or shall I report\n> a bug on bzr fast-export?\n>\n> Many thanks in advance!\n\nI would suggest hacking it to optionally not emit commit properties as step one.\n\nA later enhancement would be to optionally create directories with\nempty .gitignore files, or something similar. git really doesn't care\nabout empty directories.\n-- \nDavid\n"},{"id":"195067","messageId":"2059FC03-7308-4BAD-B90A-451F71791187@gmail.com","threadId":"31025","inReplyTo":"CAJDDKr5V++TtS24D=SsaPnkx==Zo8=fpvg2RNod9+-JGxWfhGQ@mail.gmail.com","subject":"Re: bzr->git: keep empty directories","fromName":"Steven Michalske","fromEmail":"smichalske@gmail.com","sentAt":"2012-07-15T04:01:38Z","receivedAt":"2012-07-15T04:01:38Z","isPatch":false,"sender":{"key":"smichalske@gmail.com","avatar":"https://gravatar.com/avatar/721f27456adc9ac84f3bb235f021a70015abb9e09222ae8622fc5579c6a203c1?d=mp&s=160"},"body":"Perhaps having a file named something like:\n\n.git_foreign_scm_empty_dir  or some shorter name.\n\nWith the contents of the fast importer empty directory info put in there; If any book keeping is needed.\n\nIt also looks like you strip out meta-data.\nperhaps a file like:\n\n.git_foreign_scm_metadata\n\nWe could use the .git/config file format for storing the bookkeeping data.\n\nSteve\n\nOn Jul 14, 2012, at 3:46 PM, David Aguilar wrote:\n\n> On Sat, Jul 14, 2012 at 7:41 AM, Felix Natter <fnatter@gmx.net> wrote:\n>> hello,\n>> \n>> when converting a repo from bzr to git:\n>> \n>> mkdir freeplane-git1\n>> cd freeplane-git1\n>> git init .\n>> bzr fast-export --plain --export-marks=../marks.bzr ../trunk/ | git fast-import --export-marks=../marks.git\n>> git checkout\n>> \n>> Empty directories are not contained in the git working index. This is\n>> because of the --plain option, which \"Excludes metadata to maximise\n>> interoperability\" and thus does not support empty directories\n>> (http://doc.bazaar.canonical.com/plugins/en/fastimport-plugin.html).\n>> \n>> However, when I use \"--no-plain\" (which according to above documentation\n>> exports empty directories), git cannot handle it:\n>> \n>> $ ./freeplane2git.sh\n>> Initialized empty Git repository in /home/felix/git/freeplane-git1/.git/\n>> 15:56:09 Calculating the revisions to include ...\n>> 15:56:09 Starting export of 4290 revisions ...\n>> fatal: This version of fast-import does not support feature commit-properties.\n>> fast-import: dumping crash report to .git/fast_import_crash_3915\n>> bzr: broken pipe\n>> \n>> I already tried to hack bzr-fastimport's exporter.py so that it does not\n>> emit commit properties but emits empty directories but i was not\n>> successful.\n>> \n>> So is there another way to preserve empty directories or shall I report\n>> a bug on bzr fast-export?\n>> \n>> Many thanks in advance!\n> \n> I would suggest hacking it to optionally not emit commit properties as step one.\n> \n> A later enhancement would be to optionally create directories with\n> empty .gitignore files, or something similar. git really doesn't care\n> about empty directories.\n> -- \n> David\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}