{"thread":{"id":"43680","subject":"[PATCH] Stgit: allow importing series files where patch names include slashes","startedAt":"2006-10-29T17:35:16Z","lastAt":"2006-10-29T17:35:16Z","messageCount":1,"participants":["Paolo 'Blaisorblade' Giarrusso"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"296629","messageId":"20061029173516.27112.86149.stgit@americanbeauty.home.lan","threadId":"43680","inReplyTo":null,"subject":"[PATCH] Stgit: allow importing series files where patch names include slashes","fromName":"Paolo 'Blaisorblade' Giarrusso","fromEmail":"blaisorblade@yahoo.it","sentAt":"2006-10-29T17:35:16Z","receivedAt":"2006-10-29T17:35:16Z","isPatch":true,"sender":{"key":"blaisorblade@yahoo.it","avatar":null},"body":"From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n\nDo that by converting slashes in patch name to dashes. Actually one could think\nthat different quilt folders relate to topic branches, but I do not see an\nobviously correct mapping nor users which would do that.\n\nSigned-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n---\n\n stgit/commands/imprt.py |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py\nindex 1b7dce8..c8cf42b 100644\n--- a/stgit/commands/imprt.py\n+++ b/stgit/commands/imprt.py\n@@ -85,6 +85,11 @@ def __strip_patch_name(name):\n \n     return stripped\n \n+def __replace_slashes_with_dashes(name):\n+    stripped = name.replace('/', '-')\n+\n+    return stripped\n+\n def __parse_description(descr):\n     \"\"\"Parse the patch description and return the new description and\n     author information (if any).\n@@ -299,6 +304,7 @@ def __import_series(filename, options):\n \n         if options.strip:\n             patch = __strip_patch_name(patch)\n+        patch = __replace_slashes_with_dashes(patch);\n         if options.ignore and patch in applied:\n             print 'Ignoring already applied patch \"%s\"' % patch\n             continue\nChiacchiera con i tuoi amici in tempo reale! \n http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com \n"}]}