dvcs

Retrieve old version of a file without changing working copy parent

老子叫甜甜 提交于 2019-12-04 08:49:29
问题 How do you get a copy of an earlier revision of a file in Mercurial without making that the new default working copy of the file in your workspace? I've found the hg revert command and I think it does what I want but I'm not sure. I need to get a copy of an earlier revision of my code to work with for a few minutes. But I don't want to disturb the current version which is working fine. So I was going to do this: hg revert -r 10 myfile.pls Is there a way to output it to a different directory

bitbucket, “hg push” and “hg update”

这一生的挚爱 提交于 2019-12-04 08:01:06
问题 If I start out with a local mercurial repo, which I consider to be the "main" repo (pardon me my dvcs lords), and intend to use bitbucket as a backup and issue tracking facility, I can do all my changes in my local repo and do an "hg push" to send the changes back to bitbucket. Don't I need to follow this "hg push" command run on my local machine with an "hg update"? 回答1: Why do you care what's in the working directory on BitBucket's servers? As long as you push the changes will be in the

How can I back out a merge in Mercurial and later remerge with that branch?

你。 提交于 2019-12-04 07:47:56
问题 I have two branches, default and branch1. By mistake one person in our team merged branch1 with default. The content in branch1 is not yet ready to merge with default (it contains a major rework of the build & deploy environment). We did an experiment with 'hg backout', backing out the merge (not sure this is the right way to do it). Then the changes from branch1 gets deleted on default, which is fine - but we can not remerge with branch1. How should we solve this issue? 回答1: There are many

How to make local clone without pulling subrepos again?

左心房为你撑大大i 提交于 2019-12-04 07:28:11
I often work with Mercurial by keeping a local store of my upstream clones, and then just cloning again locally for my actual working environment: $ cd /clones $ hg clone ssh://external-repo.example.com/some/repo/path/foo $ cd ~/Development $ hg clone /clones/foo This is particularly useful for me because I often want to make new clones on airplanes, etc., where I have no internet access. However, this doesn't work when the original clone contains subrepos - the presence of the .hgsubstate file means that hg will always go out to the internet instead of grabbing the local cloned revision (even

Git branching / rebasing good practices

时光毁灭记忆、已成空白 提交于 2019-12-04 03:47:57
I have a following scenario: 3 branches: - Master - MyBranch branched off Master for the purpose of developing a new feature of the system - MyBranchLocal branched off MyBranch as my local copy of the branch MyBranch is being rebased against and pushed to by other developers (who are working on the same feature as I am). As the owner of the MyBranch branch I want to keep it in sync with Master by rebasing. I also need to merge the changes I make to MyBranchLocal with MyBranch. What is a good way to do that? Couple of possible scenarios I tried so far: I. 1. Commit change to MyBranchLocal 2.

Maintaining a changelog.txt file in a DVCS

旧街凉风 提交于 2019-12-04 03:08:38
问题 I'm working on a git project that uses lots of branches. For the most part, this has been a really great workflow. I'm happy merging between branches, love being able to cherry-pick code, and the overall lifecycle that comes with git and other dvcs's. I've got one pain point that is really hurting. How to maintain a changelog.txt. I've found it hurts whenever I do a merge (the changelog.txt often conflicts), and when cherry-picking commits I've accidentally managed to pickup changes that

What is a practical workflow for keeping local changes uncommitted in git?

旧巷老猫 提交于 2019-12-04 02:01:37
What I want to do is already described in that question . But I want to solve that problem in a practical and more generic way. So the use-case is the following: I have several local changes in several files web.config , createDb.sql or in any others I don't want to commit those files, since changes are specific to my local machine only Those files must be version controlled and moreover changes are made pretty often to some of them (sql scripts in particular), so I want to receive updates for those files I do want to commit all other files I want to be able to do that without friction, in one

Distributed version control for HUGE projects - is it feasible?

若如初见. 提交于 2019-12-04 01:49:46
We're pretty happy with SVN right now, but Joel's tutorial intrigued me. So I was wondering - would it be feasible in our situation too? The thing is - our SVN repository is HUGE. The software itself has a 15 years old legacy and has survived several different source control systems already. There are over 68,000 revisions (changesets), the source itself takes up over 100MB and I cant even begin to guess how many GB the whole repository consumes. The problem then is simple - a clone of the whole repository would probably take ages to make, and would consume far more space on the drive that is

Can GIT, Mercurial, SVN, or other version control tools work well when project tree has binary files?

吃可爱长大的小学妹 提交于 2019-12-04 00:46:10
问题 Sometimes our project tree can have binary files, such as jpg, png, doc, xls, or pdf. Can GIT, Mercurial, SVN, or other tools do a good job when only part of a binary file is changed? For example, if the spec is written in .doc and it is part of the repository, then if it is 4MB, and edited 100 times but just for 1 or 2 lines, and checked in 100 times during the year, then it is 400MB. If it is 100 different .doc and .xls files, then it is 40GB... not a size that is easy to manage. I have

Is 'pull' a synonym for 'clone' in a Mercurial source-control repository?

假如想象 提交于 2019-12-03 20:09:43
问题 I'm seeing the command 'pull' and wondering how that's different from a 'clone'. Both terms seem to imply retrieving code from some remote repository. Is there some subtle distinction here? 回答1: hg clone is how you make a local copy of a remote repository. The Subversion equivalent is svn checkout . hg pull pulls changes from another repository. hg update applies those changes to the local repository. hg pull -u is equivalent to hg pull; hg update . The Subversion equivalent to hg pull -u is