title: What's the easiest way to commit and push a single file while leaving other modifications alone?
body: <p>I'm relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion.  </p>
  
  <p>How can I commit and push a single file out to another repository while leaving other modifications in my working directory uncommitted (or at least not pushed to the other repository)?</p>
  
  <p>This happens for us with database migrations.  We want to commit the migration to source control so a DBA can view and edit it while we're working on the code modifications to go along with that database migration.  The changes aren't yet ready to go so we don't want to push all of them out.</p>
  
  <p>In subversion, I'd simply do:</p>
  
  <pre><code>svn add my_migration.sql  
  # commit only the migration, but not the other files I'm working on
  svn commit -m "migration notes" my_mygration.sql
  </code></pre>
  
  <p>and continue working locally.</p>
  
  <p>This doesn't work with mercurial as when I'm pushing it out to the other repository, if there are changes to it that I haven't pulled down, it wants me to pull them down, merge them, and commit that merge to the repository.  Commits after a merge don't allow you to omit files so it forces you to commit everything in your local repository.</p>
  
  <p>The easiest thing that I can figure out is to commit the file to my local repository, clone my local repository, fetch any new changes from the actual repository, merge them and commit that merge, and them push my changes out.</p>
  
  <pre><code>hg add my_migration.sql 
  hg commit -m "migration notes" my_migration.sql 
  cd ..
  hg clone project project-clone
  cd project-clone
  hg fetch http://hg/project
  hg push  http://hg/project
  </code></pre>
  
  <p>This works, but it feels like I'm missing something easier, some way to tell mercurial to ignore the files already in my working directory, just do the merge and send the files along.  I suspect mercurial queues can do this, but I don't fully grok mq yet.</p>