I'm trying to use hooks to make mercurial behave like svn when committing. I like the idea that I can commit changes to my cloned repo while I'm away from the internet, but I never want that behavior when I do have internet access. Therefore, I want to attempt to pull before updating and attempt to push after committing. Every time. I have been consistently very unhappy with the hg merge command. [hooks]precommit = hg pull; hg uppostcommit= hg pushpost-pull = hg up However, this doesn't work. precommit freezes with the error waiting for lock on working directory of [dir] held by [procnum] and pre-commit results in other errors: running hook pre-commit: hg pull; hg uppulling from [source]searching for changesno changes foundrunning hook post-pull: hg upabort: outstanding uncommitted mergeswarning: post-pull hook exited with status 255abort: outstanding uncommitted mergeswarning: pre-commit hook exited with status 255 AG
mercurial merge
AG My most hated behavior of mercurial:
searching for changesadding changesetsadding manifestsadding file changesadded 1 changesets with 3 changes to 3 files (+1 heads)(run 'hg heads' to see heads, 'hg merge' to merge)remote: 1 changesets foundrunning hook post-pull: hg upabort: crosses branches (merge branches or use --clean to discard changes)warning: post-pull hook exited with status 255$ hg mergeabort: outstanding uncommitted changes (use 'hg status' to list changes)$ hg commitnothing changed
Solution: `` hg merge --force `` Hopefully there are other solutions that I'll eventually add to this.
Page 1 / 1