<> == Contains extension == '''This extension is not distributed with Mercurial.''' ''Author: Christoph Rissner'' ''Maintainer: [[https://bitbucket.org/cashstar|CashStar]]'' Repository: [[http://bitbucket.org/cashstar/hg-contains|http://bitbucket.org/cashstar/hg-contains]] === Overview === This extension provides a ''contains'' command to test whether a changeset is a parent to another one. This can be used to test whether some changeset is contained in a branch or not. There is an option to look for transplanted changesets as well. === Configuration === Configure your .hgrc to enable the extension by adding following lines: {{{ [extensions] hgcontains=/path/to/contains.py }}} (with the actual path to your file, of course) === Usage === {{{ list of commands: contains tests whether a changeset is parent to another one headscontaining finds heads containing a specific changeset missing finds changesets missing in a branch }}} To test whether a changeset is parent to another one {{{ hg contains [-c child] [-t] [--revno] rev tests whether a changeset is parent to another one This command tests whether the changeset given in 'rev' is a parent to the changeset given in 'child'. If no 'child' revision is given, the current working directory is used. If 'transplants' is given transplanted changesets are followed as well using the extra data set by the transplant command (which means the transplant sources must be in the same repo). If 'revno' is given the 'child' and 'rev' arguments are interpreted as revision numbers to prevent false positives due to pattern matching. You can use hashes instead of revision numbers to prevent pattern matching on the revision. options: -c --child check relationship to the given child changeset -t --transplants check transplanted changesets --revno interpret arguments as revision number (no pattern magic) }}} To find all heads containing a specific changeset use: {{{ hg headscontaining [-t] [--revno] rev finds heads containing a specific changeset This command shows all heads containing the changeset given in 'rev'. If 'transplants' is given transplanted changesets are followed as well. If 'revno' is given the 'rev' argument is interpreted as revision number to prevent false positives due to pattern matching. You can use hashes instead of revision numbers to prevent pattern matching on the revision. options: -t --transplants check transplanted changesets --revno interpret argument as revision number (no pattern magic) --style STYLE display using template map file --template TEMPLATE display with template }}} When working with several branches (say a development and a release branch) it may be interesting to see which changesets present in one branch are missing in the other (lets say you are looking for bugfixes and don't remember whether you've transplanted them or not): {{{ hg missing [-M] [-t] [--revno] [--no-tags] target source finds changesets missing in a branch This command reports all changesets present in 'source' but not in 'target'. If 'transplants' is given transplanted changesets are considered as well. If a changeset is transplanted repeatedly (x -> x' -> x'') the transplanted nodes x' and x'' are not considered but only the original changeset x. If 'revno' is given the 'target' and 'source' arguments are interpreted as revision numbers to prevent false positives due to pattern matching. You can use hashes instead of revision numbers to prevent pattern matching on the revision. options: -t --transplants check transplanted changesets --revno interpret arguments as revision number (no pattern magic) -M --no-merges do not show merges --no-tags ignore changesets that only touch .hgtags --style STYLE display using template map file --template TEMPLATE display with template }}} ---- CategoryExtensionsByOthers