I am using mercurial version control in Bitbucket.I have been working on a project with a Default branch and Product branch.Product branch started at revision number 10.It's not merged with default at any point. Now I need codes from the beginning of Product branch(ie; revision 10) to the tip of that branch to create a new repository. Is this possible. I tried
hg clone https://NAME#bitbucket.org/TEAM/REPO -r BRANCH_NAME
But I got the code from revision 1 to the tip of Product Branch.What I needed was from revision 10 to the tip. Is this possible.Please give me a solution.
Related
How can I resolve this merging issue ?
My project has 1 branch which I used for production and head. 2 times it worked merging production branch into head. Each time I created a tagged head after merging to have a start point for the next merge. Its important to note that I do not create a new branch after each merge, I reuse the branch.
The problem is, if I try to merge my branch to head. eclipse cvs acts like it is comparing and listing all files as "to update", even if file head version is greater than the file branch version.
ex: head file version is 1.8 and branch file version is 1.6. This file was already merged in last merge. When trying to merge I specifiy as "common base version" the head tag that I created after the last merge. Still, eclipse cvs suggests to override head modifications and use the branch version. This behaviour applies to all files.
I dont know what to do. I dont want to manually merge hundreds of files.
thanks for any help
Look at the example:
|tag_h1 |tag_h2
-----------------------------------------> trunk
\ ^ ^
\ / /
\----------------------------------> my_branch
|tag_b1 |tag_b2
On branch there are tags tag_b1 and tag_b2 before each merge, and in trunk, tags tag_h1 and tag_h2.
For a next merge from branch to trunk, the "common base version" of Eclipse will be the one tagged with tag_b2. With CVS update, if you specify two parameters, you will get modifications between these two merged in your working directory. Giving Branch or version to be merged (end tag)=my_branch and Common base version (start tag)=tag_b2 will merge changes from tag_b2 until my_branch end, like calling CVS from command line:
$ cvs up -j tag_b2 -j my_branch
I always tag from where I will merge, and before and after the merge, like this:
|tag_before |tag_after
--------------------------------->
^
/
------------------------------>
|tag_from
Giving the tags a name I can recognize.
I am new to a repository and all I have is a CVS branch name. I am trying to determine the branch point or base point of this branch. How can I find the pre-branch tag? Is it possible?
To be more clear - the procedure to create a branch is as follows:
create base tag:
$ cvs tag BASE
Create branch:
$ cvs tag -r BASE -b BRANCH
Taking the above example I know BRANCH - I am trying to find BASE. I have searched for quite a while and the only thing that comes up is how to create the pre-branch tag and branch (shown above), but nothing comes up on how to find out what the pre-branch tag is based on the branch name.
Thanks,
- Chuck
With the commmand
$ cvs status -v {file}
You get the tags for the {file}.
The output will be something like (in the end of it):
Existing tags:
tag_name_1 (revision 1.1)
BASE (revision 1.2)
BRANCH (branch 1.2.1)
Then you'll know what is your branch revision, and the previous revision. In the example, you know your branch name (BRANCH). Its revision is 1.2.1. The previous is 1.2, and the tag for this revision is BASE.
Maybe the revision numbers in the example aren't in the way CVS do, but you can get the idea.
I created a stable but I accidentally changed a file while working with stable branch. I committed and now my default (which is development) doesn't have it. I tried hg pull -r <changset> where changeset is the latest commit.
What should I do?
hg merge stable
This will merge the two together.
Visit https://www.mercurial-scm.org/guide and go to Merge the named branch.
You don't have to close it.
I am using BitBucket a GitHub repository, i would like to know how to get the Source of a particular revision?
I had committed some changes few days back, i want the entire source code for that revision, how can i get it?
Using Git, using git revisions, supposing your revision was published on master branch:
cd C:\Temp
git clone https://yourusername#bitbucket.org/repoowner/projectname
git checkout master#{2 days ago}
(not kidding, you can specify a date specification like that!)
Bitbucket is a Mercurial/Git repository, a GitHub competitor.
If you want to retrieve a specific changeset/revision, you can use either Git or Mercurial.
Using mercurial:
cd C:\Temp
hg clone https://yourusername#bitbucket.org/repoowner/projectname
hg up -r revnumber
Where revnumber is the number of the revision you want to retrieve.
I'm am currently working on a project which has several mercurial repositories. Each mercurial repository contains the source code for either a library or a binary, all of which are being actively developed.
You can imagine that compatability between products created from each repository can quickly become a problem. One way to relieve this problem is to update each local repository to be on compatible branches and then update to a particular date on these branches - with the view that at any point in time the branches were compatible.
On a named branch, say V0.X, at V0.1 tag
hg identify
gives
934ad264137e (V0.X) V0.1
Then update to a particular date ( I still want to stay on the V0.X branch )
hg update -d "<10/28/11"
now identify
hg identify; hg branch
gives
51a072771de7 tip
default
Does anyone know how to update along a named branch to a date without the danger of jumping off to another branch?
Any help would be appreciated.
Jon.
hg help revset
"branch(string or set)"
All changesets belonging to the given branch or the branches of the
given changesets.
...
"date(interval)"
Changesets within the interval, see "hg help dates".
give us workflow like
hg log -r "branch('V0.X') and sort(date('<10/28/11'), date)"
find revision N in list
hg update -r N