{"thread":{"id":"18047","subject":"[PATCH] git-p4: remove tabs from usermap file","startedAt":"2009-02-27T18:53:59Z","lastAt":"2009-02-27T20:50:54Z","messageCount":2,"participants":["Pete Wyckoff","Simon Hausmann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"106456","messageId":"20090227185359.GA18102@padd.com","threadId":"18047","inReplyTo":null,"subject":"[PATCH] git-p4: remove tabs from usermap file","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2009-02-27T18:53:59Z","receivedAt":"2009-02-27T18:53:59Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"Some users have tabs in their names, oddly enough.  This\ncauses problems when loading the usercache from disk,\nas split separates the fields on the wrong tabs.  When\nfast-import's parse_ident() tries to parse the committer\nfield, it is unhappy about the unbalanced <..> angle brackets.\n\nIt is easy enough to convert the tabs to single spaces.\n\nSigned-off-by: Pete Wyckoff <pw@padd.com>\n---\nHere's another random little fix.  We have a user\nFirstname\\tLastname who checked something in recently and\nbroke my git-p4 conversion.\n\nI need to send the other acked patch to Junio; will wait\nand give him two if you ack this one.\n\n contrib/fast-import/git-p4 |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex 3832f60..342529d 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -1142,7 +1142,7 @@ class P4Sync(Command):\n \n         s = ''\n         for (key, val) in self.users.items():\n-            s += \"%s\\t%s\\n\" % (key, val)\n+\t    s += \"%s\\t%s\\n\" % (key.expandtabs(1), val.expandtabs(1))\n \n         open(self.getUserCacheFilename(), \"wb\").write(s)\n         self.userMapFromPerforceServer = True\n-- \n1.6.0.6\n"},{"id":"106476","messageId":"200902272150.55132.simon@lst.de","threadId":"18047","inReplyTo":"20090227185359.GA18102@padd.com","subject":"Re: [PATCH] git-p4: remove tabs from usermap file","fromName":"Simon Hausmann","fromEmail":"simon@lst.de","sentAt":"2009-02-27T20:50:54Z","receivedAt":"2009-02-27T20:50:54Z","isPatch":true,"sender":{"key":"hausmann@kde.org","avatar":"https://gravatar.com/avatar/bc9aad4fb31dce17eb66e690e7b51fe980c62da3c225c785da35dd806b8da778?d=mp&s=160"},"body":"On Friday 27 February 2009 19:53:59 Pete Wyckoff wrote:\n> Some users have tabs in their names, oddly enough.  This\n> causes problems when loading the usercache from disk,\n> as split separates the fields on the wrong tabs.  When\n> fast-import's parse_ident() tries to parse the committer\n> field, it is unhappy about the unbalanced <..> angle brackets.\n>\n> It is easy enough to convert the tabs to single spaces.\n>\n> Signed-off-by: Pete Wyckoff <pw@padd.com>\n> ---\n> Here's another random little fix.  We have a user\n> Firstname\\tLastname who checked something in recently and\n> broke my git-p4 conversion.\n>\n> I need to send the other acked patch to Junio; will wait\n> and give him two if you ack this one.\n\nLooks good to me :-)\n\nAcked-by: Simon Hausmann <simon@lst.de>\n\n\nThanks,\nSimon\n\n>  contrib/fast-import/git-p4 |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\n> index 3832f60..342529d 100755\n> --- a/contrib/fast-import/git-p4\n> +++ b/contrib/fast-import/git-p4\n> @@ -1142,7 +1142,7 @@ class P4Sync(Command):\n>\n>          s = ''\n>          for (key, val) in self.users.items():\n> -            s += \"%s\\t%s\\n\" % (key, val)\n> +\t    s += \"%s\\t%s\\n\" % (key.expandtabs(1), val.expandtabs(1))\n>\n>          open(self.getUserCacheFilename(), \"wb\").write(s)\n>          self.userMapFromPerforceServer = True\n"}]}