* a couple of git-svn patches
@ 2011-04-01 18:42 Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
0 siblings, 2 replies; 6+ messages in thread
From: Alejandro R. Sedeño @ 2011-04-01 18:42 UTC (permalink / raw)
To: git, Eric Wong
Here are two independent git-svn patches that my co-worker handed off
to me back in January.
The first changes the behavior of commit_url to be like that of url so
that you can commit to multiple branches.
The second uses Memoize to cache the results of shelling out to
git-config, which has good performance benefits for git-svn fetch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config
2011-04-01 18:42 a couple of git-svn patches Alejandro R. Sedeño
@ 2011-04-01 18:42 ` Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
1 sibling, 0 replies; 6+ messages in thread
From: Alejandro R. Sedeño @ 2011-04-01 18:42 UTC (permalink / raw)
To: git, Eric Wong; +Cc: James Knight, Alejandro R. Sedeño
From: James Knight <jknight@itasoftware.com>
This is necessary if you want to be able to commit to multiple branches.
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
git-svn.perl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index a5857c1..aa41896 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -523,12 +523,14 @@ sub cmd_dcommit {
}
if (defined $_commit_url) {
- $url = $_commit_url;
+ $url = $_commit_url . (length $gs->{path} ? '/' . $gs->{path} : '');
} else {
$url = eval { command_oneline('config', '--get',
"svn-remote.$gs->{repo_id}.commiturl") };
if (!$url) {
$url = $gs->full_url
+ } else {
+ $url = $url . (length $gs->{path} ? '/' . $gs->{path} : '');
}
}
--
1.7.4.2.1.gd6f1f
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] git-svn: Cache results of running the executable "git config"
2011-04-01 18:42 a couple of git-svn patches Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
@ 2011-04-01 18:42 ` Alejandro R. Sedeño
1 sibling, 0 replies; 6+ messages in thread
From: Alejandro R. Sedeño @ 2011-04-01 18:42 UTC (permalink / raw)
To: git, Eric Wong; +Cc: James Y Knight, Alejandro R. Sedeño
From: James Y Knight <jknight@itasoftware.com>
Running programs is not cheap!
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
git-svn.perl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index aa41896..e47e04c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -59,6 +59,7 @@ use File::Find;
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
use IPC::Open3;
use Git;
+use Memoize; # core since 5.8.0, Jul 2002
BEGIN {
# import functions from Git into our packages, en masse
@@ -72,6 +73,8 @@ BEGIN {
*{"${package}::$_"} = \&{"Git::$_"};
}
}
+ Memoize::memoize 'Git::config';
+ Memoize::memoize 'Git::config_bool';
}
my ($SVN);
@@ -3199,6 +3202,8 @@ sub has_no_changes {
Memoize::unmemoize 'check_cherry_pick';
Memoize::unmemoize 'has_no_changes';
}
+
+ Memoize::memoize 'Git::SVN::repos_root';
}
END {
--
1.7.4.2.1.gd6f1f
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] git-svn: Cache results of running the executable "git config"
2011-04-04 19:09 [PATCHv2 0/2] a couple of git-svn patches Alejandro R. Sedeño
@ 2011-04-04 19:09 ` Alejandro R. Sedeño
2011-04-04 21:53 ` Eric Wong
0 siblings, 1 reply; 6+ messages in thread
From: Alejandro R. Sedeño @ 2011-04-04 19:09 UTC (permalink / raw)
To: git, Eric Wong; +Cc: James Y Knight, Alejandro R. Sedeño
From: James Y Knight <jknight@itasoftware.com>
Running programs is not cheap!
Signed-off-by: James Y Knight <jknight@itasoftware.com>
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
git-svn.perl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index aa41896..e47e04c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -59,6 +59,7 @@ use File::Find;
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
use IPC::Open3;
use Git;
+use Memoize; # core since 5.8.0, Jul 2002
BEGIN {
# import functions from Git into our packages, en masse
@@ -72,6 +73,8 @@ BEGIN {
*{"${package}::$_"} = \&{"Git::$_"};
}
}
+ Memoize::memoize 'Git::config';
+ Memoize::memoize 'Git::config_bool';
}
my ($SVN);
@@ -3199,6 +3202,8 @@ sub has_no_changes {
Memoize::unmemoize 'check_cherry_pick';
Memoize::unmemoize 'has_no_changes';
}
+
+ Memoize::memoize 'Git::SVN::repos_root';
}
END {
--
1.7.4.2.1.gd6f1f
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] git-svn: Cache results of running the executable "git config"
2011-04-04 19:09 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
@ 2011-04-04 21:53 ` Eric Wong
[not found] ` <7voc4l5hm5.fsf@alter.siamese.dyndns.org>
0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2011-04-04 21:53 UTC (permalink / raw)
To: Alejandro R. Sedeño; +Cc: git, James Y Knight
"Alejandro R. Sedeño" <asedeno@mit.edu> wrote:
> From: James Y Knight <jknight@itasoftware.com>
>
> Running programs is not cheap!
>
> Signed-off-by: James Y Knight <jknight@itasoftware.com>
> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Thanks, acked and pushed out to git://bogomips.org/git-svn.git
--
Eric Wong
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] git-svn: Cache results of running the executable "git config"
[not found] ` <7voc4l5hm5.fsf@alter.siamese.dyndns.org>
@ 2011-04-05 8:15 ` Junio C Hamano
0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2011-04-05 8:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Eric Wong, Alejandro R. Sedeño, git, James Y Knight
Eric Wong <normalperson@yhbt.net> writes:
> "Alejandro R. Sedeño" <asedeno@mit.edu> wrote:
>> From: James Y Knight <jknight@itasoftware.com>
>>
>> Running programs is not cheap!
>>
>> Signed-off-by: James Y Knight <jknight@itasoftware.com>
>> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
>
> Thanks, acked and pushed out to git://bogomips.org/git-svn.git
Hmph, any comment on 1/2 of the series?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-04-05 8:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01 18:42 a couple of git-svn patches Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
-- strict thread matches above, loose matches on Subject: below --
2011-04-04 19:09 [PATCHv2 0/2] a couple of git-svn patches Alejandro R. Sedeño
2011-04-04 19:09 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
2011-04-04 21:53 ` Eric Wong
[not found] ` <7voc4l5hm5.fsf@alter.siamese.dyndns.org>
2011-04-05 8:15 ` Junio C Hamano
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).