Here are three ways to do this. I'll discuss the pros and cons of each:
Option 1: use hg diff
to get a diff file showing the uncommited changes, and then hg import --nocommit
on the receiving end to apply those changes without creating a new changeset
- Pros: simple, creates no changesets
- Cons: doesn't actually use mercurial ike the DVCS it is. Might not catch newly added files
Option 2: Commit on the sending side, push to the receiving end (or pull from it, or put a hg bundle
on a flash drive), bypassing the work server, update
on the receiving side, and then hg rollback
on both sides to eliminate the changeset (but leave the changes.
- Pros: Using push and pull to move over changes like mercurial intends
- Cons: Hacky. Relies on rollback which only works 1-level deep. Accidentally pull twice and you can't undo the first.
Option 3: Commit on the sending side. Push to a developer-repo that only you access, and Pull on the receiving end. Don't push to the company repo until things build, but when you do push push all the interstitial changesets
- Pros: Exactly what a DVCS is about. Your order of work is documented and preserved
- Cons: requires setting up a you-only clone
FWIW, I recommend option 3. Per-developer repositories are exactly what DVCSs are about. If your company doesn't make it easy to set one up on a server you can access from home and away, point out to them the immense value in having documented the process that got a developer to a completed fix/feature and that encouraging developers to push to a not-required-to-compile repo frequently is good for daily backups.
Lastly, after you're done with your feature or fix you can always collapse-away all the intermediary changesets. I don't like do it (I'm a show your work kind of guy), but here's how: http://stackoverflow.com/questions/1725607/can-i-squash-commits-in-mercurial/1725638#1725638