I want to create a HG repository from a SVN repository, but I do not want the HG repository to have any of the commit comments. What would be the easiest way to do this?
A:
- Update your SVN folder on disk, then wipe out all the '.svn' subfolders. Or, with TortoiseSVN Repository Explorer, navigate to the desired folder and export it to your disk.
- Add the files to a fresh HG repository.
HTH
Thomas
Thomas Weller
2010-08-18 14:58:14
That would take a lot of manual exports/imports to get every revision.
Alias
2010-08-18 14:59:18
So you want to keep the revisions and only get rid of the associated comments?
Thomas Weller
2010-08-18 15:19:48
Yes, I want to keep the revisions and only get rid of the associated comments.
Alias
2010-08-18 15:32:42
Hmm, AFAIK there's no simple way. Even if you use the HistEdit HG-extension from below you have to edit each and every single changeset...But I'm curious: Why do you want to do that?
Thomas Weller
2010-08-19 04:39:11
+1
A:
Import svn repository with comments (eiher via Convert extension or hgsubversion bridge). Than use HistEdit to rewrite history and remove comments.
Michal Sznajder
2010-08-18 16:58:26
+1
A:
If you don't mind editing a bit of Python code, get a local hg installation and change its convert extension to clobber all commit messages during conversion.
Something like
diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -294,6 +294,7 @@
commit.author = self.authors.get(commit.author, commit.author)
commit.branch = self.branchmap.get(commit.branch, commit.branch)
self.commitcache[rev] = commit
+ commit.desc = 'no message'
return commit
def copy(self, rev):
should do the trick.
wbruna
2010-08-20 22:33:09