git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-p4: remove tabs from usermap file
@ 2009-02-27 18:53 Pete Wyckoff
  2009-02-27 20:50 ` Simon Hausmann
  0 siblings, 1 reply; 2+ messages in thread
From: Pete Wyckoff @ 2009-02-27 18:53 UTC (permalink / raw)
  To: Simon Hausmann; +Cc: git

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] git-p4: remove tabs from usermap file
  2009-02-27 18:53 [PATCH] git-p4: remove tabs from usermap file Pete Wyckoff
@ 2009-02-27 20:50 ` Simon Hausmann
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Hausmann @ 2009-02-27 20:50 UTC (permalink / raw)
  To: Pete Wyckoff; +Cc: git

On Friday 27 February 2009 19:53:59 Pete Wyckoff wrote:
> 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.

Looks good to me :-)

Acked-by: Simon Hausmann <simon@lst.de>


Thanks,
Simon

>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-27 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 18:53 [PATCH] git-p4: remove tabs from usermap file Pete Wyckoff
2009-02-27 20:50 ` Simon Hausmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).