Created
February 10, 2012 16:01
-
-
Save deanmalmgren/1790480 to your computer and use it in GitHub Desktop.
merge work from mercurial repository ./X/path/to/dir into repository ./Y/path/to/dir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from the bash prompt... | |
# starting from the directory that contains repositories X and Y, use 'hg convert --filemap' to find | |
# extract the content from path/to/dir in repository X and put it into a temporary repository TMP | |
echo 'include "path/to/dir"' > filemap.txt | |
hg convert --filemap.txt ./X ./TMP | |
# enter repository Y and do a "force pull" to pull in the changes from the temporary repository TMP | |
cd ./Y | |
hg pull -f ../TMP | |
# this should create a new head because the repository histories in Y and TMP are unrelated. | |
# Now just need to merge in the changes and check it all in. At this point path/to/dir should be | |
# in repository Y | |
hg merge | |
hg ci -m "merging work from repository X/path/to/dir into repository Y" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment