{"thread":{"id":"8667","subject":"[PATCH] Let git-svnimport clean up SVK commit messages.","startedAt":"2007-06-21T02:14:55Z","lastAt":"2007-06-21T21:58:08Z","messageCount":8,"participants":["Dave O'Neill","Steven Grimm","Sam Vilain","Jeffrey C. Ollie"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"45455","messageId":"1182392095394-git-send-email-dmo@roaringpenguin.com","threadId":"8667","inReplyTo":null,"subject":"[PATCH] Let git-svnimport clean up SVK commit messages.","fromName":"Dave O'Neill","fromEmail":"dmo@roaringpenguin.com","sentAt":"2007-06-21T02:14:55Z","receivedAt":"2007-06-21T02:14:55Z","isPatch":true,"sender":{"key":"dmo@roaringpenguin.com","avatar":null},"body":"SVK likes to begin all commit messages with a line of the format:\n   r12345@hostname: user | YYYY-MM-DD HH:MM:SS -ZZZZ\nwhich makes the import desperately ugly in git.  This adds a -k option to move\nthis extra SVK commit line to the end of the commit message, rather than\nkeeping it at the beginning.\n---\n Documentation/git-svnimport.txt |    6 +++++-\n git-svnimport.perl              |   18 +++++++++++++++---\n 2 files changed, 20 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-svnimport.txt b/Documentation/git-svnimport.txt\nindex e97d15e..23a54b0 100644\n--- a/Documentation/git-svnimport.txt\n+++ b/Documentation/git-svnimport.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n --------\n [verse]\n 'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]\n-\t\t[ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev]\n+\t\t[ -C <GIT_repository> ] [ -i ] [ -k ] [ -u ] [-l limit_rev]\n \t\t[ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ]\n \t\t[ -s start_chg ] [ -m ] [ -r ] [ -M regex ]\n \t\t[ -I <ignorefile_name> ] [ -A <author_file> ]\n@@ -68,6 +68,10 @@ When importing incrementally, you might need to edit the .git/svn2git file.\n \tPrepend 'rX: ' to commit messages, where X is the imported\n \tsubversion revision.\n \n+-k::\n+\tRemove SVK-style revision/commiter info from the top of commit\n+\tmessages and move it to the bottom.\n+\n -I <ignorefile_name>::\n \tImport the svn:ignore directory property to files with this\n \tname in each directory. (The Subversion and GIT ignore\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex f459762..7076f41 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -32,20 +32,20 @@ $ENV{'TZ'}=\"UTC\";\n \n our($opt_h,$opt_o,$opt_v,$opt_u,$opt_C,$opt_i,$opt_m,$opt_M,$opt_t,$opt_T,\n     $opt_b,$opt_r,$opt_I,$opt_A,$opt_s,$opt_l,$opt_d,$opt_D,$opt_S,$opt_F,\n-    $opt_P,$opt_R);\n+    $opt_P,$opt_R,$opt_k);\n \n sub usage() {\n \tprint STDERR <<END;\n Usage: ${\\basename $0}     # fetch/update GIT from SVN\n        [-o branch-for-HEAD] [-h] [-v] [-l max_rev] [-R repack_each_revs]\n        [-C GIT_repository] [-t tagname] [-T trunkname] [-b branchname]\n-       [-d|-D] [-i] [-u] [-r] [-I ignorefilename] [-s start_chg]\n+       [-d|-D] [-i] [-k] [-u] [-r] [-I ignorefilename] [-s start_chg]\n        [-m] [-M regex] [-A author_file] [-S] [-F] [-P project_name] [SVN_URL]\n END\n \texit(1);\n }\n \n-getopts(\"A:b:C:dDFhiI:l:mM:o:rs:t:T:SP:R:uv\") or usage();\n+getopts(\"A:b:C:dDFhiI:kl:mM:o:rs:t:T:SP:R:uv\") or usage();\n usage if $opt_h;\n \n my $tag_name = $opt_t || \"tags\";\n@@ -835,7 +835,19 @@ sub commit {\n \t\t$pw->writer();\n \t\t$pr->reader();\n \n+\n+\t\tif ( $opt_k ) {\n+\t\t\t# Remove SVK cruft in commit message\n+\t\t\tmy ($svk_info) = $message =~ s{(r\\d+\\@[^:]+:\\s+\\S+\\s+\\|\\s+\\d{4}-\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}\\s[\\+-]\\d{4})\\s*}{};\n+\t\t\tif( $svk_info ) {\n+\t\t\t\t# and stick it on the end so we don't lose it\n+\t\t\t\t$message .= \"\\n$svk_info\"\n+\t\t\t}\n+\t\t}\n+\n+\n \t\t$message =~ s/[\\s\\n]+\\z//;\n+\n \t\t$message = \"r$revision: $message\" if $opt_r;\n \n \t\tprint $pw \"$message\\n\"\n-- \n1.5.2.2.239.g89630\n"},{"id":"45459","messageId":"4679EE45.2080605@midwinter.com","threadId":"8667","inReplyTo":"1182392095394-git-send-email-dmo@roaringpenguin.com","subject":"Re: [PATCH] Let git-svnimport clean up SVK commit messages.","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-06-21T03:19:33Z","receivedAt":"2007-06-21T03:19:33Z","isPatch":true,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Dave O'Neill wrote:\n> SVK likes to begin all commit messages with a line of the format:\n>    r12345@hostname: user | YYYY-MM-DD HH:MM:SS -ZZZZ\n> which makes the import desperately ugly in git.  This adds a -k option to move\n> this extra SVK commit line to the end of the commit message, rather than\n> keeping it at the beginning.\n>   \n\nAny chance of applying this to git-svn instead? There has been talk of \ndeprecating git-svnimport since git-svn now does everything \ngit-svnimport does, and more. (If you believe that's not the case, \nplease describe what you're doing with git-svnimport that you can't do \nwith git-svn.)\n\n-Steve\n"},{"id":"45468","messageId":"467A141D.1050502@vilain.net","threadId":"8667","inReplyTo":"1182392095394-git-send-email-dmo@roaringpenguin.com","subject":"Re: [PATCH] Let git-svnimport clean up SVK commit messages.","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2007-06-21T06:01:01Z","receivedAt":"2007-06-21T06:01:01Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Dave O'Neill wrote:\n> SVK likes to begin all commit messages with a line of the format:\n>    r12345@hostname: user | YYYY-MM-DD HH:MM:SS -ZZZZ\n> which makes the import desperately ugly in git.  This adds a -k option to move\n> this extra SVK commit line to the end of the commit message, rather than\n> keeping it at the beginning.\n\nThis is a good idea, of course if somebody didn't specify the magic -I\nswitch to their 'svk sm' incantation then there will be multiple changes\nlisted in a single revision\n\nsome examples\n\nhttp://dev.catalystframework.org/svnweb/Catalyst/revision/?rev=6477\nsvn log -r 7190:7190 http://svn.pugscode.org/pugs\n\nThere was also a pretty nasty bug in SVK which pushed huge commitlogs\nwith no changes\n\nsee for example\n\nhttp://utsl.gen.nz/gitweb/?p=pugs;a=commit;h=817b73f\n(or:\nsvn log -r 14734:14734 http://svn.pugscode.org/pugs\nsvn diff -r 14733:14734 http://svn.pugscode.org/pugs\n)\n\nThat occurred often enough that it might even be worth detecting and\ndealing with specially.  ie, if multiple SVK changesets are seen in a\ncommit with no changes, mark it as likely bogus.\n\nYeah, I'm not sure what to say about all this other than \"lolsvn\".\n\nSam.\n"},{"id":"45502","messageId":"20070621141415.GA21065@magnesium.roaringpenguin.com","threadId":"8667","inReplyTo":"4679EE45.2080605@midwinter.com","subject":"Re: [PATCH] Let git-svnimport clean up SVK commit messages.","fromName":"Dave O'Neill","fromEmail":"dmo@roaringpenguin.com","sentAt":"2007-06-21T14:14:15Z","receivedAt":"2007-06-21T14:14:15Z","isPatch":true,"sender":{"key":"dmo@roaringpenguin.com","avatar":null},"body":"On Wed, Jun 20, 2007 at 08:19:33PM -0700, Steven Grimm wrote:\n\n> Any chance of applying this to git-svn instead? There has been talk of \n> deprecating git-svnimport since git-svn now does everything \n> git-svnimport does, and more. (If you believe that's not the case, \n> please describe what you're doing with git-svnimport that you can't do \n> with git-svn.)\n\nSure, I can probably apply it to git-svn as well, but based on the\ntesting I've done, git-svnimport still works better for what I'm doing.\nI'm trying to do a straight conversion from SVN to git, so we can do\naway with our Subversion repositories, so I won't need the bidirectional\nsupport of git-svn.  \n\nIf git-svn had a --one-way option that could \n  - know that I'm converting, and import my SVN tags and branches to\n    local tags and heads rather than remotes\n  - turn off the git-svn-id: tags in the commit\n  - avoid preserving a .git/svn/ directory (a git-svn conversion was 50%\n    larger than one from git-svnimport because of this)\n  - convert svn:ignore attrs to .gitignore (like the -I option of\n    git-svnignore)\n\nthen I wouldn't need git-svnimport.  Alternatively, if there's some way\nto postprocess my clone to do all of the above, that would probably be\ngood enough.\n\nCheers,\nDave\n"},{"id":"45503","messageId":"20070621142257.GB21065@magnesium.roaringpenguin.com","threadId":"8667","inReplyTo":"467A141D.1050502@vilain.net","subject":"Re: [PATCH] Let git-svnimport clean up SVK commit messages.","fromName":"Dave O'Neill","fromEmail":"dmo@roaringpenguin.com","sentAt":"2007-06-21T14:22:57Z","receivedAt":"2007-06-21T14:22:57Z","isPatch":true,"sender":{"key":"dmo@roaringpenguin.com","avatar":null},"body":"On Thu, Jun 21, 2007 at 06:01:01PM +1200, Sam Vilain wrote:\n> This is a good idea, of course if somebody didn't specify the magic -I\n> switch to their 'svk sm' incantation then there will be multiple changes\n> listed in a single revision\n\nYeah, I don't think there's much hope of fully cleaning up those\nmessages.  My goal was just to make 'git log --pretty=oneline' show\nsomething meaningful from the commit message, rather than:\n\nedfbf48adabb68f9b3973f5950570c355f3ee811  r6211@oxygen:  dmo | 2007-04-17 17:28:23 -0400\nd5b3268e815ce9e88dd617a5b62df80da263f396  r6210@oxygen:  dmo | 2007-04-17 15:54:04 -0400\n\nCheers,\nDave\n"},{"id":"45504","messageId":"1182438000.4031.11.camel@lt21223.campus.dmacc.edu","threadId":"8667","inReplyTo":"20070621141415.GA21065@magnesium.roaringpenguin.com","subject":"Re: [PATCH] Let git-svnimport clean up SVK commit messages.","fromName":"Jeffrey C. Ollie","fromEmail":"jeff@ocjtech.us","sentAt":"2007-06-21T15:00:00Z","receivedAt":"2007-06-21T15:00:00Z","isPatch":true,"sender":{"key":"jeff@ocjtech.us","avatar":"https://gravatar.com/avatar/95918a1992f277a811c471ae7275f7e4c9d1a2e517ad290bd6aa93b97e8d34f3?d=mp&s=160"},"body":"On Thu, 2007-06-21 at 10:14 -0400, Dave O'Neill wrote:\n> On Wed, Jun 20, 2007 at 08:19:33PM -0700, Steven Grimm wrote:\n> \n> > Any chance of applying this to git-svn instead? There has been talk of \n> > deprecating git-svnimport since git-svn now does everything \n> > git-svnimport does, and more. (If you believe that's not the case, \n> > please describe what you're doing with git-svnimport that you can't do \n> > with git-svn.)\n> \n> Sure, I can probably apply it to git-svn as well, but based on the\n> testing I've done, git-svnimport still works better for what I'm doing.\n> I'm trying to do a straight conversion from SVN to git, so we can do\n> away with our Subversion repositories, so I won't need the bidirectional\n> support of git-svn.  \n> \n> If git-svn had a --one-way option that could \n>   - know that I'm converting, and import my SVN tags and branches to\n>     local tags and heads rather than remotes\n\nThis quickie Python script should convert the \"tag branches\" to regular\nGit tags:\n\n        import os\n        refs = os.popen('git-for-each-ref --format=\"%(objectname)%00%(refname)%00\" refs/remotes/tags')\n        for line in refs:\n            [sha, ref] = line.split('\\0')[:2]\n            os.system('git tag %s %s' % (ref[18:], sha))\n\n\n>   - turn off the git-svn-id: tags in the commit\n\ngit svn fetch --no-metadata\n\n>   - avoid preserving a .git/svn/ directory (a git-svn conversion was 50%\n>     larger than one from git-svnimport because of this)\n\nOnce you are done importing, you can delete that directory.\n\n>   - convert svn:ignore attrs to .gitignore (like the -I option of\n>     git-svnignore)\n\ngit svn show-ignore\n\n> then I wouldn't need git-svnimport.  Alternatively, if there's some way\n> to postprocess my clone to do all of the above, that would probably be\n> good enough.\n\n"},{"id":"45527","messageId":"11824590923150-git-send-email-dmo@roaringpenguin.com","threadId":"8667","inReplyTo":"1182392095394-git-send-email-dmo@roaringpenguin.com","subject":"[PATCH] Let git-svnimport and git-svn clean up SVK commit messages","fromName":"Dave O'Neill","fromEmail":"dmo@roaringpenguin.com","sentAt":"2007-06-21T20:51:32Z","receivedAt":"2007-06-21T20:51:32Z","isPatch":true,"sender":{"key":"dmo@roaringpenguin.com","avatar":null},"body":"SVN repositories that have been committed to with SVK will have commits that\ncontain SVK metadata on the first line of the message:\n\n   r12345@hostname: user | YYYY-MM-DD HH:MM:SS -ZZZZ\n\nAfter importing, git will then pick up this first as the commit title, which\nisn't terribly informative in 'git log --pretty=oneline' or gitk.\n\nThis patch adds a -k option to git-svnimport and a --fix-svk-message option\n(and fixSvkMessage config option) to git-svn.  Enabling this option allows\ngit-svn to try and move that metadata to the end of the commit message,\npossibly giving us a more meaningful first line.\n---\n Documentation/git-svn.txt       |   13 +++++++++++++\n Documentation/git-svnimport.txt |    6 +++++-\n git-svn.perl                    |   23 ++++++++++++++++++++---\n git-svnimport.perl              |   15 ++++++++++++---\n 4 files changed, 50 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex c0d7d95..5cd89f9 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -54,6 +54,8 @@ COMMANDS\n \tSet the 'useSvmProps' option in the [svn-remote] config.\n --use-svnsync-props;;\n \tSet the 'useSvnsyncProps' option in the [svn-remote] config.\n+--fix-svk-message;;\n+\tSet the 'fixSvkMessage' option in the [svn-remote] config.\n --rewrite-root=<URL>;;\n \tSet the 'rewriteRoot' option in the [svn-remote] config.\n --username=<USER>;;\n@@ -385,6 +387,14 @@ 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-remote.<name>.fixSvkMessage::\n+\tSVN repositories that have been committed to with SVK will have\n+\tcommits that contain SVK metadata on the first line of the\n+\tmessage, which git will then pick up as the commit title.  Enabling\n+\tthis option allows git-svn to try and move that metadata to the end\n+\tof the commit message, possibly giving us a more meaningful first\n+\tline.\n+\n Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps\n options all affect the metadata generated and used by git-svn; they\n *must* be set in the configuration file before any history is imported\n@@ -393,6 +403,9 @@ and these settings should never be changed once they are set.\n Additionally, only one of these four options can be used per-svn-remote\n section because they affect the 'git-svn-id:' metadata line.\n \n+The fixSvkMessage option may be set in combination with any of these, and\n+can be set after import if desired.\n+\n --\n \n BASIC EXAMPLES\ndiff --git a/Documentation/git-svnimport.txt b/Documentation/git-svnimport.txt\nindex e97d15e..23a54b0 100644\n--- a/Documentation/git-svnimport.txt\n+++ b/Documentation/git-svnimport.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n --------\n [verse]\n 'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]\n-\t\t[ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev]\n+\t\t[ -C <GIT_repository> ] [ -i ] [ -k ] [ -u ] [-l limit_rev]\n \t\t[ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ]\n \t\t[ -s start_chg ] [ -m ] [ -r ] [ -M regex ]\n \t\t[ -I <ignorefile_name> ] [ -A <author_file> ]\n@@ -68,6 +68,10 @@ When importing incrementally, you might need to edit the .git/svn2git file.\n \tPrepend 'rX: ' to commit messages, where X is the imported\n \tsubversion revision.\n \n+-k::\n+\tRemove SVK-style revision/commiter info from the top of commit\n+\tmessages and move it to the bottom.\n+\n -I <ignorefile_name>::\n \tImport the svn:ignore directory property to files with this\n \tname in each directory. (The Subversion and GIT ignore\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 50128d7..1451f0d 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -83,6 +83,7 @@ my %init_opts = ( 'template=s' => \\$_template, 'shared:s' => \\$_shared,\n                   'trunk|T=s' => \\$_trunk, 'tags|t=s' => \\$_tags,\n                   'branches|b=s' => \\$_branches, 'prefix=s' => \\$_prefix,\n                   'minimize-url|m' => \\$Git::SVN::_minimize_url,\n+\t\t  'fix-svk-message' => \\$Git::SVN::_fix_svk_message,\n \t\t  'no-metadata' => sub { $icv{noMetadata} = 1 },\n \t\t  'use-svm-props' => sub { $icv{useSvmProps} = 1 },\n \t\t  'use-svnsync-props' => sub { $icv{useSvnsyncProps} = 1 },\n@@ -280,6 +281,11 @@ sub do_git_init_db {\n \t\tcommand_noisy('config', \"$pfx.$i\", $icv{$i});\n \t\t$set = $i;\n \t}\n+\n+\tif( defined $Git::SVN::_fix_svk_message ) {\n+\t\tcommand_noisy('config', \"$pfx.fixSvkMessage\", $Git::SVN::_fix_svk_message);\n+\t}\n+\n }\n \n sub init_subdir {\n@@ -826,7 +832,7 @@ sub working_head_info {\n package Git::SVN;\n use strict;\n use warnings;\n-use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent\n+use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent $_fix_svk_message\n             $_repack $_repack_flags $_use_svm_props $_head\n             $_use_svnsync_props $no_reuse_existing $_minimize_url/;\n use Carp qw/croak/;\n@@ -849,7 +855,7 @@ BEGIN {\n \t# per [svn-remote \"...\"] section.  Command-line options will *NOT*\n \t# override options set in an [svn-remote \"...\"] section\n \tno strict 'refs';\n-\tfor my $option (qw/follow_parent no_metadata use_svm_props\n+\tfor my $option (qw/follow_parent no_metadata use_svm_props fix_svk_message\n \t\t\t   use_svnsync_props/) {\n \t\tmy $key = $option;\n \t\t$key =~ tr/_//d;\n@@ -1613,7 +1619,18 @@ sub do_git_commit {\n \t}\n \tdefined(my $pid = open3(my $msg_fh, my $out_fh, '>&STDERR', @exec))\n \t                                                           or croak $!;\n-\tprint $msg_fh $log_entry->{log} or croak $!;\n+\tmy $log_msg = $log_entry->{log};\n+\n+\tif( $self->fix_svk_message ) {\n+\t\t# Remove SVK cruft in commit message\n+\t\t$log_msg =~ s{(r\\d+\\@[^:]+:\\s+\\S+\\s+\\|\\s+\\d{4}-\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}\\s[\\+-]\\d{4})\\s*}{};\n+\t\tif( $1 ) {\n+\t\t\t# and stick it on the end so we don't lose it\n+\t\t\t$log_msg .= \"\\n$1\"\n+\t\t}\n+\t}\n+\n+\tprint $msg_fh $log_msg or croak $!;\n \tunless ($self->no_metadata) {\n \t\tprint $msg_fh \"\\ngit-svn-id: $log_entry->{metadata}\\n\"\n \t\t              or croak $!;\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex f459762..89afdd8 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -32,20 +32,20 @@ $ENV{'TZ'}=\"UTC\";\n \n our($opt_h,$opt_o,$opt_v,$opt_u,$opt_C,$opt_i,$opt_m,$opt_M,$opt_t,$opt_T,\n     $opt_b,$opt_r,$opt_I,$opt_A,$opt_s,$opt_l,$opt_d,$opt_D,$opt_S,$opt_F,\n-    $opt_P,$opt_R);\n+    $opt_P,$opt_R,$opt_k);\n \n sub usage() {\n \tprint STDERR <<END;\n Usage: ${\\basename $0}     # fetch/update GIT from SVN\n        [-o branch-for-HEAD] [-h] [-v] [-l max_rev] [-R repack_each_revs]\n        [-C GIT_repository] [-t tagname] [-T trunkname] [-b branchname]\n-       [-d|-D] [-i] [-u] [-r] [-I ignorefilename] [-s start_chg]\n+       [-d|-D] [-i] [-k] [-u] [-r] [-I ignorefilename] [-s start_chg]\n        [-m] [-M regex] [-A author_file] [-S] [-F] [-P project_name] [SVN_URL]\n END\n \texit(1);\n }\n \n-getopts(\"A:b:C:dDFhiI:l:mM:o:rs:t:T:SP:R:uv\") or usage();\n+getopts(\"A:b:C:dDFhiI:kl:mM:o:rs:t:T:SP:R:uv\") or usage();\n usage if $opt_h;\n \n my $tag_name = $opt_t || \"tags\";\n@@ -835,6 +835,15 @@ sub commit {\n \t\t$pw->writer();\n \t\t$pr->reader();\n \n+\t\tif ( $opt_k ) {\n+\t\t\t# Remove SVK cruft in commit message\n+\t\t\t$message =~ s{(r\\d+\\@[^:]+:\\s+\\S+\\s+\\|\\s+\\d{4}-\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}\\s[\\+-]\\d{4})\\s*}{};\n+\t\t\tif( $1 ) {\n+\t\t\t\t# and stick it on the end so we don't lose it\n+\t\t\t\t$message .= \"\\n$1\"\n+\t\t\t}\n+\t\t}\n+\n \t\t$message =~ s/[\\s\\n]+\\z//;\n \t\t$message = \"r$revision: $message\" if $opt_r;\n \n-- \n1.5.2.2.239.g89630\n"},{"id":"45529","messageId":"20070621215808.GD21065@magnesium.roaringpenguin.com","threadId":"8667","inReplyTo":"1182438000.4031.11.camel@lt21223.campus.dmacc.edu","subject":"Re: [PATCH] Let git-svnimport clean up SVK commit messages.","fromName":"Dave O'Neill","fromEmail":"dmo@roaringpenguin.com","sentAt":"2007-06-21T21:58:08Z","receivedAt":"2007-06-21T21:58:08Z","isPatch":true,"sender":{"key":"dmo@roaringpenguin.com","avatar":null},"body":"On Thu, Jun 21, 2007 at 10:00:00AM -0500, Jeffrey C. Ollie wrote:\n> This quickie Python script should convert the \"tag branches\" to regular\n> Git tags:\n> \n>         import os\n>         refs = os.popen('git-for-each-ref --format=\"%(objectname)%00%(refname)%00\" refs/remotes/tags')\n>         for line in refs:\n>             [sha, ref] = line.split('\\0')[:2]\n>             os.system('git tag %s %s' % (ref[18:], sha))\n\nThanks!  I'll give that a try.  It would be nice if this sort of cleanup\nwere part of git-svn in some way, though.  I doubt I'll be the last\nperson wanting an easy conversion from SVN.\n\nCheers,\nDave\n"}]}