mercurial-ruby
mercurial-ruby copied to clipboard
Clone a particular branch
There doesn't appear to be a way to specify a particular branch that you can clone when you use Repository::clone.
Also, it does not appear that there is anyway to change the current branch of the repository.
Use Mercurial::Shell.run and add an extra option -b. E.g.
Mercurial::Shell.run(["clone ? ? ?", "-bmy_branch", "file:///home/bozydar/workspaces/example-repo", "/tmp/example-repo-clone/"], :append_hg => true)
I believe that in the same way you can change the current branch