In my main repo (on the server), there is the usual "default" branch, and an new one created from it called "my-dev". I will be pushing changes to "my-dev" branch. Periodically I would like to pull in changes from "default" branch, to keep the two branches synced with respect to default. My initial steps are:
hg clone default
hg update my-dev
// Make changes
// Commit, push changesets into my-dev branch.
Now time to sync "default" and "my-dev".
- Pull in changes from the "default" branch in repo to local workspace. (Is it "hg pull -b default" ?).
- Move over the newly pulled down changesets from "default" to "my-dev".
Can someone please suggest me the commands/options for step 1 and 2.
In git, for step 2 I would do a "git rebase". All the new changesets in "my-dev" since the creation of "my-dev" are undone, changesets are brought in from "default" branch (no conflict occurs and should not occur). Then my changesets are applied back one by one. Any conflict that occurs, I need to fix each one. Bottom line, the changesets brought in from "default" stay intact (same hash, no modification needed as a result of merge conflict). However, I might require updating my changesets (which is ok) that I pushed into "my-dev".
UPDATE: After completion of feature in my-dev branch (in a few months), I would like to move all the changesets in my-dev back onto default.