{"thread":{"id":"33669","subject":"git-svn: problem with svn cp trunk/subdir tags/subdir_1.0","startedAt":"2013-04-29T12:46:45Z","lastAt":"2013-05-02T18:19:26Z","messageCount":3,"participants":["Ilya Basin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"215839","messageId":"1826029946.20130429164645@gmail.com","threadId":"33669","inReplyTo":null,"subject":"git-svn: problem with svn cp trunk/subdir tags/subdir_1.0","fromName":"Ilya Basin","fromEmail":"basinilya@gmail.com","sentAt":"2013-04-29T12:46:45Z","receivedAt":"2013-04-29T12:46:45Z","isPatch":false,"sender":{"key":"basinilya@gmail.com","avatar":null},"body":"After fixing --preserve-empty-dirs plus --stdlayout a new problem\narised:\nWhen creating a tag or branch from a subdir, a disjoint branch\nis created. Then git-svn re-imports the commits using this dir as\nstrip path.\n\nWhy? I would instead keep the current commit as parent, delete\neverything except the subdir and move its contents to root directory.\n\nDuring this re-import the variable %added_placeholder is not up to\ndate. Because the branch is disjoint, this variable should be empty in\nthe beginning, but it's not.\nBecause of that git-svn tries to delete non-existent .gitignore files\nand dies.\n\nI think, if a disjoint branch is created, %added_placeholder should be\npushed and cleared. A new set of paths starting with \"trunk/\" will be\nadded to it during re-import.\nWhen re-import is done, we should translate the paths to\n\"tags/subdir_1.0/\" and merge with the original %added_placeholder.\n"},{"id":"215847","messageId":"1531127990.20130429170032@gmail.com","threadId":"33669","inReplyTo":"1826029946.20130429164645@gmail.com","subject":"Re: git-svn: problem with svn cp trunk/subdir tags/subdir_1.0","fromName":"Ilya Basin","fromEmail":"basinilya@gmail.com","sentAt":"2013-04-29T13:00:32Z","receivedAt":"2013-04-29T13:00:32Z","isPatch":false,"sender":{"key":"basinilya@gmail.com","avatar":null},"body":"IB> After fixing --preserve-empty-dirs plus --stdlayout a new problem\nIB> arised:\nIB> When creating a tag or branch from a subdir, a disjoint branch\nIB> is created. Then git-svn re-imports the commits using this dir as\nIB> strip path.\n\nIB> Why? I would instead keep the current commit as parent, delete\nIB> everything except the subdir and move its contents to root directory.\n\nIB> During this re-import the variable %added_placeholder is not up to\nIB> date. Because the branch is disjoint, this variable should be empty in\nIB> the beginning, but it's not.\nIB> Because of that git-svn tries to delete non-existent .gitignore files\nIB> and dies.\n\nIB> I think, if a disjoint branch is created, %added_placeholder should be\nIB> pushed and cleared. A new set of paths starting with \"trunk/\" will be\nIB> added to it during re-import.\nIB> When re-import is done, we should translate the paths to\nIB> \"tags/subdir_1.0/\" and merge with the original %added_placeholder.\n\nA simpler approach would be to store paths in %added_placeholder\nalready translated from \"trunk/subdir/\" to \"tags/subdir_1.0/\".\nBut in the beginning of re-import Fetcher doesn't know the new branch\nname.\n\n-- \n"},{"id":"216297","messageId":"603835689.20130502221926@gmail.com","threadId":"33669","inReplyTo":"1826029946.20130429164645@gmail.com","subject":"Re: git-svn: problem with svn cp trunk/subdir tags/subdir_1.0","fromName":"Ilya Basin","fromEmail":"basinilya@gmail.com","sentAt":"2013-05-02T18:19:26Z","receivedAt":"2013-05-02T18:19:26Z","isPatch":false,"sender":{"key":"basinilya@gmail.com","avatar":null},"body":"IB> When creating a tag or branch from a subdir, a disjoint branch\nIB> is created. Then git-svn re-imports the commits using this dir as\nIB> strip path.\n\nIB> Why? I would instead keep the current commit as parent, delete\nIB> everything except the subdir and move its contents to root directory.\n\nEven worse, git-svn does doble work, failing to find the parent branch:\nThe revision is imported 3 times (2 times creating the same SHA)\n\n    r8803 = 7bfe8f8d950edd645c6f15193e639953c0b936ac (refs/remotes/trunk)\n    Found possible branch point: file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/trunk/GUI => file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/tags/GUI_4.0.25, 8803\n    Initializing parent: refs/remotes/tags/GUI_4.0.25@8803\n    r6 = de89d3fd4dff9c44f1c79a316364196d0c81c9f6 (refs/remotes/tags/GUI_4.0.25@8803)\n    ...\n    r8803 = ffc46ad0e967636f2000d354481c0419a4c6cec4 (refs/remotes/tags/GUI_4.0.25@8803)\n    Found branch parent: (refs/remotes/tags/GUI_4.0.25) ffc46ad0e967636f2000d354481c0419a4c6cec4\n    Following parent with do_switch\n    Successfully followed parent\n    r8804 = 2cbe962f0fb58c3f2d236ca918941e353da45af4 (refs/remotes/tags/GUI_4.0.25)\n    ...\n\n\n    r8923 = ad38e54ca9bb6b26654571bb14d17301484437dc (refs/remotes/tags/GUI_4.0.26)\n    r8924 = e1932e8fdeab291f54ed06064da3ae7eb1e3eddb (refs/remotes/trunk)\n    Found possible branch point: file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/trunk/GUI => file:///home/il/builds/sicap/gitsvn/prd_dmc4.svn/tags/GUI_4.0.26, 8925\n    Initializing parent: refs/remotes/tags/GUI_4.0.26@8925\n    r6 = de89d3fd4dff9c44f1c79a316364196d0c81c9f6 (refs/remotes/tags/GUI_4.0.26@8925)\n    ...\n    r8803 = ffc46ad0e967636f2000d354481c0419a4c6cec4 (refs/remotes/tags/GUI_4.0.26@8925)\n    r8805 = dac5886451f64e63d70b307bcc6f0c8ccf9c9882 (refs/remotes/tags/GUI_4.0.26@8925)\n    ...\n"}]}