Use smerge minor mode in emacs to resolve conflicts.
The condition-case is used to suppress errors with emacs versions before 21.
#!/bin/shhg initecho a > ahg ci -Am thg mv a bhg ci -Am t1hg debugrename bhg mv b ahg ci -Am t2hg debugrename aecho % test with --revhg debugrename --rev 1 b