In Gerrit's review UI, is there any extension or way to identify lines of code that were moved? Currently everything appears to be a normal added/removed line.
This is a feature I sorely miss from Reviewboard and even git --color-moved.
Related
currently building a project clone and push all the changes to my github account step by step.
And i always used to see 'Twitter.xcodeproj/project.pbxproj' checked together with modified .swift files.
However, i don't see it now. I've reopened and did some additional changes to the code, but still nothing.
Is that ok, if it's not pushed?
And how do i get it back to normal if it's not?
The list you are looking at is generated by git status. Well, git status does not include any files that didn't change. So you should not expect to see project.pbxproj in the list unless you did something that would change it (like making a new code file and adding it to your project). Merely editing your existing code wouldn't change it, so it doesn't appear.
(In a way, this is a case of the classic confusion as to what git status means. Beginners often think that it's a list of your files, or a list of the files that will go into this commit. It isn't. A commit always contains all your files. But git doesn't bother to list them in the git status, because that could be an unnecessarily huge list. There are ways to find out what's in the commit, but the screen you are displaying is not how to do it.)
TL;DR Don't worry, be happy.
What I would like to achieve is that no longer used (feature) branches in gerrit are blocked for the submission of new changes and patches.
The gerrit documentation just says how to do it, but not what the effect is (or I did not see it).
I could try to find out by running a few experiments, but that will not necessarily give me the full picture. Can someone point me to more documentation or tell me from experience and/or insight into the codebase?
Possible effects could be:
No more pushes to refs/for/deletedBranch allowed (certainly)
Branch removed from underlying git repo (I guess not)
Not yet merged changes posted to refs/for/deletedBranch disappear (hopefully not, there should be a guard against this case)
Already submitted/merged changes and their patchsets disappear from the listing of merged changes (hopefully not)
What will really happen?
It seems like at completely random, someone's changes will disappear, and the history of the changes will disappear as well. It's almost like the history of a file is tied to the file itself instead of being saved on TFS itself. Anyone know why this would be happening?
Edit: A little more explanation.
As an example scenario...
I work on item A to reorganize a view and then commit the changes via gated check-in, which finished successfully.
A couple days later, a coworker is working in the same area and turns around and asks me if I was still working on the reorganization because it looks like it has for the past random length of time. So I step over and look over their shoulder and sure enough, it is EXACTLY as it was before I started working on it.
Naturally, I pull up the history of the file, and there is no record of my commit whatsoever. It's like I just did the work and commit in my head.
Final Edit:
This appeared today - It appears that TFS is taking it upon itself to determine which version is more important and taking that version without consulting the developer.
It seems that Plastic SCM does not track code moved between files (compare with e.g. Git) Am I right, or is there a way how to switch this feature on?
(Disclaimer: I work for Plastic SCM).
As far as I know git is able to track moved fragments of code between files when you run a "git blame", but it doesn't use this information during merge, correct? Git is able to calculate the "moved fragment" between files if it happens on the same commit and that's what it does while processing the 'blame'.
No, Plastic is not able to do that yet, which is a shame because we're already doing some interesting things around the idea:
First we have semantic method history which is able to track the history of a given method even when it has been moved, renamed and modified, but always inside the same file. We have plans to extend this to a repository wide basis, indeed we were about to implement it by the end of last year but we had to postpone it since we got some other highly requested features to work on.
The 'semantic method history' is based on the SemanticMerge tech we've developed. Right now it also works inside the file, but plans are also to come up with SemanticMerge multi-file (we even have a working prototype already). I expect this to be several steps ahead of what other tools can do.
Applying the last two together it wouldn't be hard to do something like 'blame with moved code', which as you pointed is something really great to have. Hopefully we'll release something like this in the coming months.
This sounds like a simple thing to do, but I am not sure if it is possible ...
If I use TFS annotate, I can determine when each line of code was changed and the changeset where it was changed. This is great for determining when something was added or modified. But what about determining when something was removed?
Does the removal of code appear in an annotate? I don't think it does. If not, how can I detect when some code was removed?
Does the removal of code appear in an annotate?
I don't think so.
Which leaves taking diffs between specific versions, perhaps using divide and conquer to find the specific changeset.
I don't think it is possible, annotation does not show code removal. You can open the History dialog for a File, Ctrl+Select 2 fairly separate changesets and then Compare those and see if the line was there or not. Keep increasing/decreasing the range of the changesets until you find it.