Switch to hg-flow model: how to rebase commits and branches

I started some time ago a small project and used mercurial as RCS.
All commits were done in the default branch, except for one feature branch currently in development in a separate clone of the project.
The project became quite important and I’d like to switch to Driessen’s model.

I’ve been able to rebase all commits from default:rev1 to develop using

  • Putting uncommitted changes at Master to a new branch by Git
  • How to create a remote Git branch without creating a local branch?
  • Separate git branch into multiple branches to merge to master
  • Why does git branch history remain when the branch has been deleted
  • Git rebase from one branch to another
  • Deleting a local Git Branch that was never pushed - delete it on the server, too?
  • $ # Starting in the default branch
    $ hg up -r 0
    $ hg branch develop
    $ hg ci -m 'created the develop branch'
    $ hg rebase --source 1
    

    My problem is that I can’t import my feature/new-feature branch into the develop branch without losing the branch information.
    I’m quite confident there is a adequat way to do it but I can’t find it.

    Any advice?

    Thanks in advance.

  • git multiple user names for the different projects within the same system
  • What's the difference between Git add (ctrl+A) and Stage to Commit (ctrl+T) in the git GUI?
  • Pre-push and post-push hooks involving remote checkout
  • Unexpected commit hash in a tarball on GitHub
  • How to cherry-pick from stash in git?
  • Git with centralized workflow
  • 2 Solutions collect form web for “Switch to hg-flow model: how to rebase commits and branches”

    Try hgflow. It’s like git-flow for Mercurial
    https://bitbucket.org/yinwm/hgflow/wiki/UserManual

    OK so this is the workaround I came to.
    Maybe there is a proper solution.
    Anyway, this works.

    $ # Create branch develop at rev 0.
    $ hg up -r 0
    $ hg branch develop
    $ hg ci -m 'creating branch develop'
    $ 
    $ # Rebase all commits into the develop branch.
    $ # This will merge the feature/new-feature branch into develop.
    $ hg rebase -s 1
    $ 
    $ # Re-create the feature/new-feature branch from its original parent.
    $ hg up -r 357
    $ hg branch feature/new-feature
    $ hg ci -m 'created branch feature/new-feature'
    $ 
    $ # Move commits that belong to this branch from develop from newly re-created
    $ # branch.
    $ hg rebase --base 358 --dest tip
    
    Git Baby is a git and github fan, let's start git clone.