I have a mercurial project in which I would like to use jQuery-File-Upload.
I added the following to my .hgsub
file in order to create a subrepo for this plugin:
public/assets/common/js/filedrop = [git]git://github.com/blueimp/jQuery-File-Upload.git
The problem I have is that I need to use in the jquery-ui
branch of this git repo in my project.
Is there any way to specify the branch name of a git repo to pull as a hg subrepo?
Found it out by myself.
In fact you don't need to do anything special. All you have to do, after editing your .hgsub
to add your subrepo, and cloning it, is to change directory to that repository, checkout the desired branch or rev and commit using mercurial.
In my case, the whole process was (in a terminal):
$ echo "public/assets/common/js/jQuery-File-Upload = [git]git://github.com/blueimp/jQuery-File-Upload.git" >> .hgsub
$ cd public/assets/common/js/
$ git clone git://github.com/blueimp/jQuery-File-Upload.git
$ cd jQuery-File-Upload
$ git checkout jquery-ui
$ hg commit -m"ADDED: jQuery-File-Upload subrepo (jquery branch)"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With