This is a summary of a StackOverflow question http://stackoverflow.com/questions/12109203/merge-different-repositories-into-one
hg rename * repo2
hg commit -m "Move repo2 files into a subfolder"
hg pull -f path\to\repo2
... and deal with merge conflicts if any ...
hg commit -m "Merge with repo2"
When you execute imqcmd command from OpenMQ you have to provide username and password, which is a bit of a PITA if you are calling the imqcmd from Java programs.
This is the recipe you can use to get around this problem:
Create a file calles imqCmd.password with following content: imq.imqcmd.password=ADMIN_OPENMQ_PASSWORD
If you are on Linux it is a good idea to make the file readable only to your user: chmod 600 imqCmd.password
Run the commands for queue creation: $com.sun.aas.imqBin/imqcmd create dst -n MyQueue -t q -o "maxNumMsgs=1000" -o "limitBehavior=FLOW_CONTROL" -o "maxNumMsgs=-1" -o "localDeliveryPreferred=false" -o "useDMQ=true" -o "validateXMLSchemaEnabled=false" -u admin -passfile PATH_TO_PASSWORD_FILE
You can also delete the queue: $com.sun.aas.imqBin/imqcmd destroy dst -n MyQueue -t q -f -u admin -passfile PATH_TO_PASSWORD_FILE
com.sun.aas.imqBin is a System property that tells you where you can find imqcmd and other OpenMQ executables. It is only set on a Glassfish process.