Name Peter Arrenbrecht
Member since
Email peter [dot] arrenbrecht [at] gmail [dot] com
Home page http://arrenbrecht.ch/
Description (none)

Contents

1 Comments

#1 − A few suggestions

parren

a) Use the shelve or the attic extension to temporarily undo local changes to a repo. These basically keep shelved changes stowed away in a patch file so you can reapply them later. AFAIK attic actually uses Hg’s merge-forward logic to reapply to the original ancestor of the shelf, then merges forward to where you really want them applied now. This is more resilient than trying to apply patches with fuzz. I do this too, with two small shell scripts, which I’ll gladly send you if you want them. If you want to get super-sophisticated, check out mq with guarded patches. But before you do any of this, check out suggestion c).

b) Read `man hgignore`. But beware that a file, once in the current manifest, is tracked by hg regardless of what .hgignore says. This is actually a feature.

c) Consider moving non-default configuration to a secondary, untracked file, which earthli should look for but silently skip if missing. This will much better guard you from accidentally committing temporary config changes.

d) Consider using an update hook to automatically update to tip on your servers when something gets pushed (no ssh’ing anymore).

e) Look into the graphlog extension. Shows some ASCII art.

Points taken:

* Since there is `hg merge -f` to force a merge over uncommitted changes, then why is there no way to commit just the effects of the merge? Might be a little tricky, though, as Hg conceptually does whole-tree merges, not single-file ones.

* Why does `hg status` not show resolve status? (I guess it’s because of backwards compat for scripts. Hg should have a dedicated parseable format that is _not_ the default UI output from the start…) Try `hg resolve -l` instead.

And I wonder why you even got a modified robots.txt with uncommitted changes in the working copy. `hg merge` should not have touched robots.txt in this case.

What I don’t see is your gripe about merging from the command line. Aren’t you merging on your dev-box? Don’t you have visual tools for the actual file-merges there? You can even use p4merge. (http://mercurial.selenic.com/wiki/MergeProgram)

Sadly, TortoiseHg is not yet available for OS X. I use it on Ubuntu and simply love the way it lets me work from the command line and seamlessly switch into GUI mode as needed.

Cheers,
-peo

(Attached to Article Mercurial: Why So Unhelpful? in Technology)