Re: [PATCH 02/10] vcs-svn: save marks for imported commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(pruned cc because reviving an old thread)
Hi,

Jonathan Nieder wrote:

> [Subject: vcs-svn: save marks for imported commits]
>
> Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>

That's a lousy commit message.  A version committed later (that
eventually found its way to David's repository) explains:

	This way, a person can use

		svnadmin dump $path |
		svn-fe |
		git fast-import --relative-marks --export-marks=svn-revs

	to get a list of what commit corresponds to each svn revision (plus
	some irrelevant blob names) in .git/info/fast-import/svn-revs.

In other words, this is the first half of a two-way mapping between
svn and git commit names.

It should be possible to build a mapping the other way like so:

	awk '
	BEGIN {
		print "commit refs/notes/svn-id";
		printf "committer ";
		system("git var GIT_COMMITTER_IDENT");
		print "data <<EOT";
		print "Automatically generated commits-to-revs mapping.";
		print "EOT";
	}
	{
		num = 0 + substr($1, 2);
		commitname = $2;
		if (num < 1024 * 1024 * 1024) {
			print "N inline " commitname
			print "data <<EOT";
			print "r" num;
			print "EOT";
		}
	}
	' .git/info/fast-import/svn-revs |
	git fast-import
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]