git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-svn: cleanup sprintf usage for uppercasing hex
@ 2013-01-24  1:28 Eric Wong
  2013-01-24  1:32 ` [PULL] git-svn updates for master Eric Wong
  2013-01-24  1:33 ` [PATCH] git-svn: cleanup sprintf usage for uppercasing hex Jonathan Nieder
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Wong @ 2013-01-24  1:28 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano

We do not need to call uc() separately for sprintf("%x")
as sprintf("%X") is available.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 perl/Git/SVN.pm        | 4 ++--
 perl/Git/SVN/Editor.pm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index 59215fa..490e330 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -490,7 +490,7 @@ sub refname {
 	#
 	# Additionally, % must be escaped because it is used for escaping
 	# and we want our escaped refname to be reversible
-	$refname =~ s{([ \%~\^:\?\*\[\t])}{uc sprintf('%%%02x',ord($1))}eg;
+	$refname =~ s{([ \%~\^:\?\*\[\t])}{sprintf('%%%02X',ord($1))}eg;
 
 	# no slash-separated component can begin with a dot .
 	# /.* becomes /%2E*
@@ -2377,7 +2377,7 @@ sub map_path {
 
 sub uri_encode {
 	my ($f) = @_;
-	$f =~ s#([^a-zA-Z0-9\*!\:_\./\-])#uc sprintf("%%%02x",ord($1))#eg;
+	$f =~ s#([^a-zA-Z0-9\*!\:_\./\-])#sprintf("%%%02X",ord($1))#eg;
 	$f
 }
 
diff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm
index 3db1521..fa0d3c6 100644
--- a/perl/Git/SVN/Editor.pm
+++ b/perl/Git/SVN/Editor.pm
@@ -146,7 +146,7 @@ sub url_path {
 	my ($self, $path) = @_;
 	if ($self->{url} =~ m#^https?://#) {
 		# characters are taken from subversion/libsvn_subr/path.c
-		$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#uc sprintf("%%%02x",ord($1))#eg;
+		$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#sprintf("%%%02X",ord($1))#eg;
 	}
 	$self->{url} . '/' . $self->repo_path($path);
 }
-- 
Eric Wong

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

* [PULL] git-svn updates for master
  2013-01-24  1:28 [PATCH] git-svn: cleanup sprintf usage for uppercasing hex Eric Wong
@ 2013-01-24  1:32 ` Eric Wong
  2013-01-24 10:25   ` [PULL (updated)] " Eric Wong
  2013-01-24  1:33 ` [PATCH] git-svn: cleanup sprintf usage for uppercasing hex Jonathan Nieder
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Wong @ 2013-01-24  1:32 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git, Barry Wardell

The following changes since commit ec3ae6ec46ed48383ae40643990f169b65a563cc:

  Merge git://ozlabs.org/~paulus/gitk (2013-01-23 08:35:03 -0800)

are available in the git repository at:


  git://bogomips.org/git-svn master

for you to fetch changes up to 812ed405ac961093b7eb916246d5f288630edfb2:

  git-svn: cleanup sprintf usage for uppercasing hex (2013-01-24 01:30:04 +0000)

----------------------------------------------------------------
Barry Wardell (1):
      git-svn: Simplify calculation of GIT_DIR

Eric Wong (1):
      git-svn: cleanup sprintf usage for uppercasing hex

 git-svn.perl             | 38 +++++++++++++++-----------------------
 perl/Git/SVN.pm          |  4 ++--
 perl/Git/SVN/Editor.pm   |  2 +-
 t/t9100-git-svn-basic.sh |  8 ++++++++
 4 files changed, 26 insertions(+), 26 deletions(-)

-- 
Eric Wong

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

* Re: [PATCH] git-svn: cleanup sprintf usage for uppercasing hex
  2013-01-24  1:28 [PATCH] git-svn: cleanup sprintf usage for uppercasing hex Eric Wong
  2013-01-24  1:32 ` [PULL] git-svn updates for master Eric Wong
@ 2013-01-24  1:33 ` Jonathan Nieder
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Nieder @ 2013-01-24  1:33 UTC (permalink / raw
  To: Eric Wong; +Cc: git, Junio C Hamano

Eric Wong wrote:

> We do not need to call uc() separately for sprintf("%x")
> as sprintf("%X") is available.

For what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

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

* [PULL (updated)] git-svn updates for master
  2013-01-24  1:32 ` [PULL] git-svn updates for master Eric Wong
@ 2013-01-24 10:25   ` Eric Wong
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2013-01-24 10:25 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git, Barry Wardell, Jonathan Nieder

I've squashed the change I mentioned in
http://mid.gmane.org/20130124101417.GA22138@dcvr.yhbt.net
to Barry's commit, and added Jonathan's Reviewed-by to my cleanup
commit.

The following changes since commit ec3ae6ec46ed48383ae40643990f169b65a563cc:

  Merge git://ozlabs.org/~paulus/gitk (2013-01-23 08:35:03 -0800)

are available in the git repository at:


  git://bogomips.org/git-svn for-junio

for you to fetch changes up to bc93ceb7c5ec959ad275f575a3c49ff491337a8b:

  git-svn: Simplify calculation of GIT_DIR (2013-01-24 10:21:23 +0000)

(My old master is unchanged.)

----------------------------------------------------------------
Barry Wardell (1):
      git-svn: Simplify calculation of GIT_DIR

Eric Wong (1):
      git-svn: cleanup sprintf usage for uppercasing hex

 git-svn.perl             | 37 ++++++++++++++-----------------------
 perl/Git/SVN.pm          |  4 ++--
 perl/Git/SVN/Editor.pm   |  2 +-
 t/t9100-git-svn-basic.sh |  8 ++++++++
 4 files changed, 25 insertions(+), 26 deletions(-)
-- 
Eric Wong

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

* [PULL] git-svn updates for master
@ 2015-02-26 21:35 Eric Wong
  2015-02-26 22:06 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2015-02-26 21:35 UTC (permalink / raw
  To: Junio C Hamano
  Cc: Mike, Minty, Nico Schlömer, Valery Yundin, Kyle J. McKay,
	Ryuichi Kokubo, git

Hi Junio, mainly bugfixes but a tiny amount of progress on lazy-loading.
The bugfixes from Kyle and Ryuichi should also be applied to maint.
Thanks.

The following changes since commit 7f4ba4b6e3ba7075ca6b379ba23fd3088cbe69a8:

  Post 2.3 cyle (batch #5) (2015-02-25 15:44:04 -0800)

are available in the git repository at:

  git://bogomips.org/git-svn.git master

for you to fetch changes up to e0b4cad4fd77e4cd787c3ed26e7650fc4de8bcd2:

  Git::SVN::*: avoid premature FileHandle closure (2015-02-26 20:19:41 +0000)

----------------------------------------------------------------
Eric Wong (1):
      git-svn: lazy load some modules

Kyle J. McKay (1):
      Git::SVN::*: avoid premature FileHandle closure

Ryuichi Kokubo (1):
      git-svn: fix localtime=true on non-glibc environments

 git-svn.perl            | 13 +++++++------
 perl/Git/SVN.pm         | 25 +++++++++++++++----------
 perl/Git/SVN/Editor.pm  |  3 +--
 perl/Git/SVN/Fetcher.pm | 11 +++++++++--
 perl/Git/SVN/Ra.pm      |  8 +++++++-
 5 files changed, 39 insertions(+), 21 deletions(-)

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

* Re: [PULL] git-svn updates for master
  2015-02-26 21:35 [PULL] git-svn updates for master Eric Wong
@ 2015-02-26 22:06 ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2015-02-26 22:06 UTC (permalink / raw
  To: Eric Wong
  Cc: Mike, Minty, Nico Schlömer, Valery Yundin, Kyle J. McKay,
	Ryuichi Kokubo, git

Eric Wong <normalperson@yhbt.net> writes:

> Hi Junio, mainly bugfixes but a tiny amount of progress on lazy-loading.
> The bugfixes from Kyle and Ryuichi should also be applied to maint.

I think you mean "cherry-picked".  Let me try to rearrange them by
doing the following:

0. Grab your stuff.

    $ git fetch git://bogomips.org/git-svn.git master

1. Queue two fixes for maint-2.2

    $ git checkout -b svn-maint-fixes maint-2.2
    $ git cherry-pick -s -2 FETCH_HEAD

2. Queue the other one for master, together with the other two

    $ git co -b svn-fixes FETCH_HEAD~2
    $ git merge --no-edit svn-maint-fixes

3. Make sure I got that right by comparing with yours

    $ git diff FETCH_HEAD
    ... no output ...

Then I'll merge svn-fixes to my 'master' and hopefully we can later
merge svn-maint-fixes to 'maint' and 'maint-2.2'.

Thanks.    

> Thanks.
>
> The following changes since commit 7f4ba4b6e3ba7075ca6b379ba23fd3088cbe69a8:
>
>   Post 2.3 cyle (batch #5) (2015-02-25 15:44:04 -0800)
>
> are available in the git repository at:
>
>   git://bogomips.org/git-svn.git master
>
> for you to fetch changes up to e0b4cad4fd77e4cd787c3ed26e7650fc4de8bcd2:
>
>   Git::SVN::*: avoid premature FileHandle closure (2015-02-26 20:19:41 +0000)
>
> ----------------------------------------------------------------
> Eric Wong (1):
>       git-svn: lazy load some modules
>
> Kyle J. McKay (1):
>       Git::SVN::*: avoid premature FileHandle closure
>
> Ryuichi Kokubo (1):
>       git-svn: fix localtime=true on non-glibc environments
>
>  git-svn.perl            | 13 +++++++------
>  perl/Git/SVN.pm         | 25 +++++++++++++++----------
>  perl/Git/SVN/Editor.pm  |  3 +--
>  perl/Git/SVN/Fetcher.pm | 11 +++++++++--
>  perl/Git/SVN/Ra.pm      |  8 +++++++-
>  5 files changed, 39 insertions(+), 21 deletions(-)

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

end of thread, other threads:[~2015-02-26 22:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24  1:28 [PATCH] git-svn: cleanup sprintf usage for uppercasing hex Eric Wong
2013-01-24  1:32 ` [PULL] git-svn updates for master Eric Wong
2013-01-24 10:25   ` [PULL (updated)] " Eric Wong
2013-01-24  1:33 ` [PATCH] git-svn: cleanup sprintf usage for uppercasing hex Jonathan Nieder
  -- strict thread matches above, loose matches on Subject: below --
2015-02-26 21:35 [PULL] git-svn updates for master Eric Wong
2015-02-26 22:06 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).