{"thread":{"id":"3289","subject":"[PATCH] Handle the case where cvsps claims a branch is an ancestor of itself","startedAt":"2006-02-10T21:02:37Z","lastAt":"2006-02-10T21:02:37Z","messageCount":1,"participants":["Christian Biesinger"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15874","messageId":"200602102102.k1AL2bG0010419@biesi.no-ip.org","threadId":"3289","inReplyTo":null,"subject":"[PATCH] Handle the case where cvsps claims a branch is an ancestor of itself","fromName":"Christian Biesinger","fromEmail":"cbiesinger@web.de","sentAt":"2006-02-10T21:02:37Z","receivedAt":"2006-02-10T21:02:37Z","isPatch":true,"sender":{"key":"cbiesinger@web.de","avatar":null},"body":"cvsps sometimes claims that a branch is an ancestor of itself. That confuses\ncvsimport. This checkin makes it change the ancestor to HEAD instead.\n\nSigned-off-by: Christian Biesinger <cbiesinger@web.de>\n\n---\n\nOn the mozilla.org CVS repository, cvsps managed to output a branch as an\nancestor of itself... This patch allows cvsimport to handle that, although\nI'm not sure if this is a good idea (a better fix might be to make cvsps not\ndo that. I haven't debugged yet why it does this)\n\n git-cvsimport.perl |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\n71f7fdb5fd6eccf75ca3c9e070391f94f013dd7e\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 4b8ca95..74d6e10 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -811,6 +811,10 @@ while(<CVS>) {\n \t\t\t\tprint \"In patchset $patchset: ancestor branch unknown, setting to $opt_o\" if $opt_v;\n \t\t\t\t$ancestor = $opt_o;\n \t\t\t}\n+\t\t\tif ($ancestor eq $branch) {\n+\t\t\t\tprint \"CVSPS INCONSISTENCY: Branch is an ancestor of itself. Setting ancestor to $opt_o\\n\";\n+\t\t\t\t$ancestor = $opt_o;\n+\t\t\t}\n \t\t\tif(-f \"$git_dir/refs/heads/$branch\") {\n \t\t\t\tprint STDERR \"Branch $branch already exists!\\n\";\n \t\t\t\t$state=11;\n-- \n1.1.6\n"}]}