All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@padd.com>
To: Simon Hausmann <simon@lst.de>
Cc: git@vger.kernel.org
Subject: [PATCH] git-p4: remove tabs from usermap file
Date: Fri, 27 Feb 2009 10:53:59 -0800	[thread overview]
Message-ID: <20090227185359.GA18102@padd.com> (raw)

Some users have tabs in their names, oddly enough.  This
causes problems when loading the usercache from disk,
as split separates the fields on the wrong tabs.  When
fast-import's parse_ident() tries to parse the committer
field, it is unhappy about the unbalanced <..> angle brackets.

It is easy enough to convert the tabs to single spaces.

Signed-off-by: Pete Wyckoff <pw@padd.com>
---
Here's another random little fix.  We have a user
Firstname\tLastname who checked something in recently and
broke my git-p4 conversion.

I need to send the other acked patch to Junio; will wait
and give him two if you ack this one.

 contrib/fast-import/git-p4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 3832f60..342529d 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1142,7 +1142,7 @@ class P4Sync(Command):
 
         s = ''
         for (key, val) in self.users.items():
-            s += "%s\t%s\n" % (key, val)
+	    s += "%s\t%s\n" % (key.expandtabs(1), val.expandtabs(1))
 
         open(self.getUserCacheFilename(), "wb").write(s)
         self.userMapFromPerforceServer = True
-- 
1.6.0.6

             reply	other threads:[~2009-02-27 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27 18:53 Pete Wyckoff [this message]
2009-02-27 20:50 ` [PATCH] git-p4: remove tabs from usermap file Simon Hausmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090227185359.GA18102@padd.com \
    --to=pw@padd.com \
    --cc=git@vger.kernel.org \
    --cc=simon@lst.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.