I am new to the Mercurial and would like to seek some experienced advices about where to set branch under situation of my team's project. The project will be shared by 4 other members.
I have a repository on my local machine at directory /home/Cassie/localRepository/src1. There is another directory on my machine /home/Cassie/localRepository/src2 which holds most of common files as src1 directory but also has some different files. For example, at /home/Cassie/localRepository/src1, there are
file1 file2 file3 file4 file5
at /home/Cassie/localRepository/src2, there are
file1 file2 file3 file4(version2) file5(version 2)
I would like to make them to be two different branches and work on them separately. However, I still keep working on file1, file2 and fil3 and hope that both of these branches get updated files1 files2 files3 along with time. Please notice that both file4 and file5 at src1 directory share the same name as ones at src2 directory. If I move every files in the same directory, there will be no way to distinguish which version from which. It's why I saved one version of file4 and file5 at src1 directory and another version of file4 and file5 at scr2 directory. I have an team account at bitbucket and have pushed src1 directory to the account. Thus, the bitbucket has all files at src1 as a central repository. Now, I have problems of where to set up branch for src2 and achieve my goal.
Btw, my local machine is Linux RedHat workstation 6.2 and has mercurial 1.7 and tortoisehg 1.5.
I have tried some experiments:
(1) I created another directory, src as my local repository. Copied file1,2,3 to it, added and committed them.
(2) Then, I copied file4 from src1 directory to src and make it a branch called src1-Branch, copied, added file4.txt to src1-branch and committed it.
(3) created another branch called src2-branch, switched to src2-branch by
hg update src2-branch
,copied file4(version2) from src2 directory to current directory by
cp ../src2/file4.txt .
,added file4 and tried to commit file4.txt. However, I encountered a error message as
waiting for lock on working directory of /home/Cassie/src held by 'Cassie-PC:20994'
I then googled online and people suggested to remove the .hg/wlock. It worked !
Anyone knows Why the problem happened at the first place ? Did I do something wrong when I add the file4.txt from the src2 to src2-branch ? Thanks