Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-svn: Update git-svn to use the ability to place temporary files within repository directory
author
Marten Svanfeldt (dev)
<developer@svanfeldt.com>
Wed, 12 Nov 2008 16:38:06 +0000
(
00:38
+0800)
committer
Eric Wong
<normalperson@yhbt.net>
Fri, 14 Nov 2008 06:42:45 +0000
(22:42 -0800)
This fixes git-svn within msys where Perl will provide temporary files with path
such as /tmp while the git suit expects native Windows paths.
Signed-off-by: Marten Svanfeldt <developer@svanfeldt.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
bcdd1b4
)
diff --git
a/git-svn.perl
b/git-svn.perl
index 86075ec616418f77e42dd72593a7efd00e1200c3..914c707a90e5755879574b2717c064fd9364d054 100755
(executable)
--- a/
git-svn.perl
+++ b/
git-svn.perl
@@
-3332,11
+3332,11
@@
sub change_file_prop {
sub apply_textdelta {
my ($self, $fb, $exp) = @_;
sub apply_textdelta {
my ($self, $fb, $exp) = @_;
- my $fh =
Git::
temp_acquire('svn_delta');
+ my $fh =
$::_repository->
temp_acquire('svn_delta');
# $fh gets auto-closed() by SVN::TxDelta::apply(),
# (but $base does not,) so dup() it for reading in close_file
open my $dup, '<&', $fh or croak $!;
# $fh gets auto-closed() by SVN::TxDelta::apply(),
# (but $base does not,) so dup() it for reading in close_file
open my $dup, '<&', $fh or croak $!;
- my $base =
Git::
temp_acquire('git_blob');
+ my $base =
$::_repository->
temp_acquire('git_blob');
if ($fb->{blob}) {
print $base 'link ' if ($fb->{mode_a} == 120000);
my $size = $::_repository->cat_blob($fb->{blob}, $base);
if ($fb->{blob}) {
print $base 'link ' if ($fb->{mode_a} == 120000);
my $size = $::_repository->cat_blob($fb->{blob}, $base);
@@
-3377,7
+3377,8
@@
sub close_file {
warn "$path has mode 120000",
" but is not a link\n";
} else {
warn "$path has mode 120000",
" but is not a link\n";
} else {
- my $tmp_fh = Git::temp_acquire('svn_hash');
+ my $tmp_fh = $::_repository->temp_acquire(
+ 'svn_hash');
my $res;
while ($res = sysread($fh, my $str, 1024)) {
my $out = syswrite($tmp_fh, $str, $res);
my $res;
while ($res = sysread($fh, my $str, 1024)) {
my $out = syswrite($tmp_fh, $str, $res);
@@
-3765,7
+3766,7
@@
sub change_file_prop {
sub _chg_file_get_blob ($$$$) {
my ($self, $fbat, $m, $which) = @_;
sub _chg_file_get_blob ($$$$) {
my ($self, $fbat, $m, $which) = @_;
- my $fh =
Git::
temp_acquire("git_blob_$which");
+ my $fh =
$::_repository->
temp_acquire("git_blob_$which");
if ($m->{"mode_$which"} =~ /^120/) {
print $fh 'link ' or croak $!;
$self->change_file_prop($fbat,'svn:special','*');
if ($m->{"mode_$which"} =~ /^120/) {
print $fh 'link ' or croak $!;
$self->change_file_prop($fbat,'svn:special','*');