I think that’s a bit short notice to give all potentially affected folks a chance to veto, but if you’re willing to take the responsibility to go ahead without that, that’s fine with me.rarified wrote:Let's close the discussion tonight so if it is desired I can have the weekend to do it.
If I understand correctly, that would result in a repository with two origins (roots, whatever you call them – revisions with no parent). Note that while Git gracefully deals with that, Mercurial appears to have some trouble with it, from what I’ve seen. It refuses to pull in an additional origin in the first place unless you --force it, and when you do, it tries to attach it to the previous origin rather than letting it stand alone, but still treats file additions as additions, so merges still don’t work even though there seemingly is a common ancestor.branan wrote:We might be able to replicate the coolest merge ever and create a new repository that has both GoW and OU as parents. It'll look ugly as sin, and have duplicates of the commits that were modified during the conversion... but it will create a repo that will work for what we need.
I think having a common origin, as my proposal in the first post would achieve, would make things easier for us, given that we’re not only trying to fix up disparate bits of history, but also to work across two version control systems.
But the “Linus magic” option would be a good fallback plan if that doesn’t go through – I wasn’t aware of that possibility, thanks for bringing it up.
Ah, that’s good to know (sorry for not doing my research). It means that most likely what mangled a'moaca'’s name was a bug in Hg-Git and we should be able to fix it before it wreaks more havoc on future commits. I’ll have a look – I’m not familiar with the internals of either Mercurial or Git, but maybe I’ll find it.branan wrote:Hg-git should allow two-way work, and it's what we used for the initial conversion
Edit: OK, it’s apparently not Hg-Git’s fault: I repeated my experiment and noticed that Hg-Git got the name into Git just fine, it was the subsequent ‘git rebase’ that chopped the apostrophe. Or try this, no Hg or Hg-Git involved at all:
Code: Select all
tsessebe:~ cwalther$ git init test
Initialized empty Git repository in /Users/cwalther/test/.git/
tsessebe:~ cwalther$ cd test
tsessebe:~/test cwalther$ echo "Hello World" > hello.txt
tsessebe:~/test cwalther$ git add hello.txt
tsessebe:~/test cwalther$ git commit -m "hello" --author "a'moaca' <none@none>"
[master (root-commit) 43a6777] hello
Author: a'moaca <none@none>
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 hello.txt
tsessebe:~/test cwalther$ git log | cat
commit 43a6777b25912c1f9c4bbfbe94753d5fb56d235e
Author: a'moaca <none@none>
Date: Sat Apr 30 14:15:32 2011 +0200
hello
tsessebe:~/test cwalther$ git --version
git version 1.7.5
(from http://git.kernel.org/pub/scm/git/git.git/ident.c)
Code: Select all
static int crud(unsigned char c)
{
return c <= 32 ||
c == '.' ||
c == ',' ||
c == ':' ||
c == ';' ||
c == '<' ||
c == '>' ||
c == '"' ||
c == '\\' ||
c == '\'';
}
/*
* Copy over a string to the destination, but avoid special
* characters ('\n', '<' and '>') and remove crud at the end
*/
static int copy(char *buf, size_t size, int offset, const char *src)
{
size_t i, len;
unsigned char c;
/* Remove crud from the beginning.. */
while ((c = *src) != 0) {
if (!crud(c))
break;
src++;
}
/* Remove crud from the end.. */
len = strlen(src);
while (len > 0) {
c = src[len-1];
if (!crud(c))
break;
--len;
}
…