ANN: subsume extension

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Oct 8 06:27:37 CDT 2009


Hi all, here's a tiny new extension: a command to dummy-merge changesets.

  http://bitbucket.org/parren/hg-subsume/overview/

When you subsume a head under your working copy, it's like merging it, but
no files are changed. Hence the name "dummy-merge". Use this to get rid of
dangling heads with false starts, or when tracking multiple branches of
upstream where you have to assume the actual merges already occurred upstream.

If anyone sees a problem with this approach, please let me know.

I suppose this could be mentioned in the guide for getting rid of
unwanted heads. We might also consider having this in Hg's core, as an
option to merge.

$ hg help subsume
hg subsume [-f] [[-r] REV]

subsume another revision under the working directory (dummy-merge)

    The files in the current working directory are left unchanged. But
its second parent is set to the requested revision. So the next
    commit will have two parents.

    Unless --no-commit is specified, the working copy is then committed.

    If no revision is specified, the working directory's parent is a
head revision, and the current branch contains exactly one other
    head, the other head is subsumed by default. Otherwise, an
explicit revision to subsume must be provided.

options:

 -f --force      force even when outstanding changes
 -r --rev        revision to subsume
 -C --no-commit  do not commit immediately
 -m --message    use <text> as commit message
 -l --logfile    read commit message from <file>
 -d --date       record datecode as commit date
 -u --user       record the specified user as committer


-parren


More information about the Mercurial mailing list