{"thread":{"id":"14580","subject":"[PATCH 2/2] git-svn: make use of svn auto-props optional","startedAt":"2008-07-21T21:40:29Z","lastAt":"2008-07-25T05:50:58Z","messageCount":2,"participants":["Brad King","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"84245","messageId":"4885024D.2070402@kitware.com","threadId":"14580","inReplyTo":null,"subject":"[PATCH 2/2] git-svn: make use of svn auto-props optional","fromName":"Brad King","fromEmail":"brad.king@kitware.com","sentAt":"2008-07-21T21:40:29Z","receivedAt":"2008-07-21T21:40:29Z","isPatch":true,"sender":{"key":"brad.king@kitware.com","avatar":"https://avatars.githubusercontent.com/u/87268?v=4"},"body":"\nIn order to preserve existing default behavior, dcommit should use svn\nauto-props only if instructed to do so.  This commit creates a config\noption 'svn.autoprops' to enable the behavior.\n\nSigned-off-by: Brad King <brad.king@kitware.com>\n---\nTopics for discussion:\n\nShould we instead call this option 'useAutoProps' or some other name?\n\nDoes a 'svn-remote.<name>.autoprops' version make sense?\n(I'll need help with this one because I'm learning perl just for this).\n\nShould we still honor/require the svn config option 'enable-auto-props',\nor treat that as an option specific to 'svn add' and let this git-specific\none take over here?\n\n Documentation/git-svn.txt |    7 +++++++\n git-svn.perl              |    7 +++++--\n 2 files changed, 12 insertions(+), 2 deletions(-)\n\n\n\n\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex e7c0f1c..300a9e0 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -448,6 +448,13 @@ svn-remote.<name>.rewriteRoot::\n \tthe repository with a public http:// or svn:// URL in the\n \tmetadata so users of it will see the public URL.\n \n+svn.autoprops::\n+\n+\tTells 'dcommit' to use '[auto-props]' entries from the user\n+\tSVN configuration to set properties on added files.  The\n+\t'enable-auto-props' option in the user SVN configuration must\n+\talso be enabled.\n+\n --\n \n Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 1975b62..9e8799d 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -73,6 +73,7 @@ my %remote_opts = ( 'username=s' => \\$Git::SVN::Prompt::_username,\n                     'no-auth-cache' => \\$Git::SVN::Prompt::_no_auth_cache );\n my %fc_opts = ( 'follow-parent|follow!' => \\$Git::SVN::_follow_parent,\n \t\t'authors-file|A=s' => \\$_authors,\n+\t\t'autoprops' => \\$Git::SVN::_auto_props,\n \t\t'repack:i' => \\$Git::SVN::_repack,\n \t\t'noMetadata' => \\$Git::SVN::_no_metadata,\n \t\t'useSvmProps' => \\$Git::SVN::_use_svm_props,\n@@ -1273,7 +1274,7 @@ use constant rev_map_fmt => 'NH40';\n use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent\n             $_repack $_repack_flags $_use_svm_props $_head\n             $_use_svnsync_props $no_reuse_existing $_minimize_url\n-\t    $_use_log_author $_add_author_from/;\n+\t    $_use_log_author $_add_author_from $_auto_props/;\n use Carp qw/croak/;\n use File::Path qw/mkpath/;\n use File::Copy qw/copy/;\n@@ -3581,7 +3582,9 @@ sub A {\n \tmy $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,\n \t\t\t\t\tundef, -1);\n \tprint \"\\tA\\t$m->{file_b}\\n\" unless $::_q;\n-        $self->apply_autoprops($file, $fbat);\n+\tif ($Git::SVN::_auto_props) {\n+\t\t$self->apply_autoprops($file, $fbat);\n+\t}\n \t$self->chg_file($fbat, $m);\n \t$self->close_file($fbat,undef,$self->{pool});\n }\n\n\n\n\n"},{"id":"84834","messageId":"20080725055058.GA14756@untitled","threadId":"14580","inReplyTo":"4885024D.2070402@kitware.com","subject":"Re: [PATCH 2/2] git-svn: make use of svn auto-props optional","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-07-25T05:50:58Z","receivedAt":"2008-07-25T05:50:58Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Brad King <brad.king@kitware.com> wrote:\n> \n> In order to preserve existing default behavior, dcommit should use svn\n> auto-props only if instructed to do so.  This commit creates a config\n> option 'svn.autoprops' to enable the behavior.\n\nNo need for this.  auto-props is the correct and expected behavior for\nusers coming from the `svn' client.\n\nThere's no backwards compatibility issue, either, since this only\naffects new commits that git-svn makes.\n\nThanks.\n\n-- \nEric Wong\n"}]}