EOL extension

timeless timeless at gmail.com
Tue Dec 1 05:23:43 CST 2009


On Tue, Dec 1, 2009 at 10:12 AM, Mark Hammond <mhammond at skippinet.com.au> wrote:
> It is raindrop :)  Raindrop is hosted at hg.mozilla.org and I'm not familiar
> with what hooks they make available.  Please excuse my ignorance regarding
> server hooks, but it seems that even if they did offer such a hook, this
> would only apply at *push* time, not commit time.  Given the distributed
> nature of hg (eg, I'm also pushing to a contributor's clone hosted at
> bitbucket) it seems that by the time a server-side hook kicks in, the damage
> has already been done?

I'd assume that push hooks wouldn't discriminate by user but by
content. The rule should probably be that no added changesets can have
bad line endings.

what should happen is that you're forced to:
# first victim
hg qimport -r first_bad:tip
loop:
  fix-line-endings
  hg qref
  hg qpop && goto loop
hg qpush -a
hg qfinish -a
hg push

# later victims after first victim has fixed upstream repository
hg qimport -r first_bad:tip
hg qpop -a
hg pull --update
loop:
  [ -z "`hg qun`"] && goto done
  hg qpush || (hg qguard -- `hg qtop` +rejected)
  goto loop
done:
hg qfinish -a

Note that at some point you have to do something about the qguarded
patches. Initially I was going to use hg qdelete in my example, but I
decided that it's a bad idea because you could have normal conflicts.


More information about the Mercurial-devel mailing list