I am using CVS and I want to checkin/submit/commit multiple files. Also there are new files and I want to add those also for the same bug fix.
How can we achieve this in single command so that there will be only one comment/commit-message while committing.
When you cvs add a file, it only schedules the file for addition, it does not add the file to the repository or modify the repository in any way. When you are ready to commit your new and modified files, you can then do so with a single commit command which will then commit both the added files and the modified files to the repository with only the single comment for the commit.
Related
First, sorry for such a confusing pesky title, I really can't find a better way to describe this (would appreciate any changes suggested to post).
The problem
I synced a github repo. And also modified some files and codes inside according to my needs. But if I want to resync and update my tree to latest commits.
will my changes be overwritten?
Or will repo simply ignore modified files and move on to other files?
Or will there be patching process (I dont think this would be case since chances of problems with auto-patching are quite high)?
My guess is that it skips over modified files. And I may need to manually get the new commits from repo. But how to determine which files that have been modified have new commits? I just want to determine it, then probably manually fetch and modify them manually.
To clarify:
Consider files named "abc" and "def" which I modified.
The repo owner updated his repo with a lot of new commits.
I ran repo sync and it synced all files to newer commits except those I modified. Now how do I determine if the files that repo owner updated include "abc" and/or "def" too (assuming I myself modified a lot of files, so I can't manually check if each file has new commit or not)?
I don't want to see what files I have modified or a complete list of files with new commits, I just want to see if the files that I modified have new commits or not.
Is there any such possible way?
I do know how to determine files that are changed using `git status,
but how do I want to check if those changed files have any new commits.
When running repo sync, Repo will rebase any non-published topic branches (i.e. branches you haven't uploaded to Gerrit with repo upload).
Or will there be patching process (I dont think this would be case since chances of problems with auto-patching are quite high)?
Git will try, but if there's a conflict that it can't resolve by itself you have to step in and help out.
Consider files named "abc" and "def" which I modified. The repo owner updated his repo with a lot of new commits. I ran repo sync and it synced all files to newer commits except those I modified.
No. Either Repo rebases your branch (and updates/merges all files) or it doesn't do anything and it's up to you need to rebase or merge from the upstream. Git never does partial updates.
I dont want to see what files I have modified or a complete list of files with new commits, I just want to see if the files that I modified have new commits or not.
I think you're asking the wrong question, but sure, you can list the commits that modify a particular set of files or compare two commits and only display the differences in a particular set of files. Both git diff and git log accept one or more paths to files that you want to restrict the output to. To find the files you can use git ls-files -mo to obtain dirty files and untracked files in your workspace, git diff-tree --name-only -r HEAD~..HEAD to get the files modified by the most recent commit, and so on.
Putting it all together, the following command fetches the most recent state from the upstream and shows the new commits (git log HEAD..origin/master) that touch upon files that you yourself have modified on the current branch since the last update from the upstream (git diff-tree --name-only -r origin/master..HEAD):
git fetch
git log HEAD..origin/master -- $(git diff-tree --name-only -r origin/master..HEAD)
A Unix-like shell is assumed. On Windows things may look differently.
You can use git hook to track the list of files.
In your post-receive hook search for the given file and do what ever you need to do.
Another option is to track it manually using the follow flag
git log --follow <path>, it will print out the list of changes made to the given file in each commit
I have a file that is to be placed in two different folders. Every time, I make an update to the file, I have to copy the file to the other path also and then commit to the repository. Is there a way in Tortoise SVN to make a sort of a link, like copy to a single path and commit to repository. The other folder should automatically grab the latest version that is linked to the path?
If file must be placed in different folders inside common repository, you have to use svn:externals - one file is real file, second - link to first file
Read SVN Book!
I have merged few bat and xml files from one branch to another. After merging, I was able to see all my files merged properly (these files were already in the branch I was merging to).
However, when I tried committing, under "changes made" section I only saw four of my files. Two were missing. The missing files had xml extension. I am afraid to commit since I do not see all of my files in the list.
Has anone ever encounter this problem before?
Try to Check Out your repository in another directory, at previous revision from this commit. Verify if your files are there.
If not, I'm afraid that your files were never versioned. Otherwise, verify if the files have the old content before your commit.
I have a bunch of files that I've changed that I don't really want to commit, but I would like to back them up locally in case I would like to use them again. (Then I'll revert them.)
TortoiseSvn working status helps to view the modified files, but I want a way to save them all to a separate directory like Backups\, preferably with their folder heirararchy still in tact.
How can I do that?
UPDATE:
Apparently branching is the way to go.
But what I did was just copied the modified files paths to the clipboard (which is an option in tortoisesvn) then to a file, and created a program to copy them to a backup folder.
You can create a branch and commit those files only in that branch.
You can commit it inside a branch, so it doesn't affect your current 'trunk' or branch.
If you had a try with bazaar , that is compatible with SVN, there is a shelf command to temporarily store a set of modification and apply back them later.
Lets say, I know there is going to be a conflict with me committing but I don't want to deal with merging or anything.
I simply want to overwrite the repositories version with my own. What is the tortoisesvn command to do so?
First you have to make an update (SVN Update), so the conflict is actually happening.
Then you get three files in your directory: yourfilename.mine yourfilename.rX yourfilename.rY (X and Y are the original and the new revision numbers)
Rename the .mine file to the original file name.
Mark the conflicted file as resolved. (TortoiseSVN -> Resolved) (The .r? files will be deleted automatically)
After that you can commit the file as it were a normal change. (SVN Commit)
Look at the svn resolve command from the red book. With a command line client, you would be able to run
svn update
svn resolve -R --accept mine-full
It doesn't appear that TortoiseSVN makes this available, but if you have the command line client as backup, it may be handy. Otherwise, I'd go with a hack of the sort Neil describes (move working copy files, update, replace working copy files).
A big caution: Using the Resolved... command instead will accept the conflict-containing version after the update; you really want the file before the update.
Another (horrible) possibility:
Check out the version you know you are going to conflict with into a separate directory from your own stuff
Copy your working files over the ones in the separate directory - take care not to copy the .svn files
Commit from the separate directory