How to revert a phabricator patch - phabricator

I have phabricator patch , which i merged successfully to master.How can I revert the patch from UI ? Is it possible to revert it using UI ?

Phabricator is for reviewing code, not for editing it. It is not possible to make arbitrary changes to your repositories from the Phabricator UI. To do that, you need to go back to your client side tools - git revert and arc diff (or if you think a revert does not need reviewing; git push).

This will stay in your history but you can kind of revert to a previous diff.
Say you have phab revision <revision> and the last good diff id is <diff_id>.
git checkout <branch>
arc patch --diff <diff_id>
This will create a branch <arcpatch_revision>. To update your revision with a sqashed commit,
git checkout <arcpatch_revision>
arc diff <master-branch> --update <revision>

Related

OK to manually rebase feature branches when using Git Flow?

Im using Git Flow:
http://danielkummer.github.io/git-flow-cheatsheet/
Is it OK to manually rebase develop into my feature branches? Other peoples work on develop may affect what im doing so id like to keep my feature branches up to date.
It's OK to rebase the develop branch in a feature branch you are working on.
I do it sometimes when I'm working on a feature that takes a while to develop and in the mean time new features are introduced in the develop branch.

No default repositories in Qt Maintenance Tool

I recently installed Qt 5.5 and its MaintenanceTool (MaintenanceTool.exe). The default repositories were working, but after one day, my MaintenanceTool suddenly reported that no repositories were set.
I can temporarily enter individual repositories in the MaintenanceTool, but I would like to get the default repos set.
Why are they gone?
How can I set the default repositories again?
Thanks in advance
The Maintenance Tool is doing crazy things since the recent updates made by Qt team.
The only solution I know is:
Add the next temporary repository in "Settings":
Windows: http://download.qt.io/online/qt5/windows/x86/online_repository/
Mac: http://download.qt.io/online/qt5/mac/x64/online_repository/
Now, you can update the Qt components and you should see a new update for the Maintenance Tool.
If everything goes well, the Maintenance Tool will be fixed.
Note: The download speed of the default repo by Qt is quite slow (usually limited to 2mbps).
So you might want to use official mirrors to get much higher download speeds.
Here is some magic to quickly get those repo addresses:
Open the following url (which contains online repo components of Qt:
http://download.qt.io/online/qt5/windows/x86/online_repository/qt/
You'll see some files in that directory
Click on "Details" on the right side of any of those files.
This will show mirror links of the file such as:
http://ftp2.nluug.nl/languages/qt/online/qt5/windows/x86/online_repository/qt/1.0.0meta.7z
Cut the right side of any of those urls to make it end with online_repository.
It should be something like this afterward:
http://ftp2.nluug.nl/languages/qt/online/qt5/windows/x86/online_repository
And here we go! Now you can use that url as a repository which has higher download speeds.
As of today (2017 oct. 30) the Mac repo url http://download.qt-project.org/online/qtsdkrepository/mac_x64/root/qt worked for me
Manually added the repository as a custom repo.
Updated (only the maintenance tool was updated at that time it seems).
Relaunched the maintenance tool.
Deleted the custom repo because many repos were present in the default repositories list, then quit the maintenance tool.
Relaunched the maintenance tool and updated normally.
BTW: I used the offline installer for the first install on my Mac.
26th January 2022 : If you are using an old maintenance tool, you need to update the maintenance tool first by adding the repo 'http://download.qt-project.org/online/qtsdkrepository/windows_x86/desktop/tools_maintenance' under user defined repository following the above described steps and selecting "update components". Now you can add/remove the components such as QtCharts, Qt3D etc.

Symfony Own Private Vendor

I have a private bundle that I import in the vendor.
Now, I'm working in my project and want to edit some code in the vendor bundle.
Now I've done that and want to commit to code, so I go the dir of that bundle and say: "git commit -a" so I give a message, save and now I have a commit. Oke, "git push" and give the response "Everything is up-to-date"... So I can't push that but I can commit??
Is this not a way to commit? Should I just clone the repo and work there?
You should never edit the vendor code directly - this is the whole point of dependency management.
Composer basically works by looking at your composer.json file, and fetching the repositories and versions you specify. If you need to make changes to one of your dependencies, you should make the change in the original repository, push the changes up to GitHub (or wherever you're hosting the code) and run composer update.
When Composer installs a vendor, it checks out a particular commit, so you are not on a branch. You need to checkout the master branch — or whichever you're using — and commit to it and push it.
Its a long time ago that I asked this question. Mean while I got the answer but never updated my stackoverflow question, sorry for that!
The answer on my own question is to get the dependency with composer --prefer-source.
https://getcomposer.org/doc/03-cli.md#install
--prefer-source: There are two ways of downloading a package: source and dist. For stable versions composer will use the dist by default. The source is a version control repository. If --prefer-source is enabled, composer will install from source if there is one. This is useful if you want to make a bugfix to a project and get a local git clone of the dependency directly.

How to display SVN revision on web site dynamically?

My web site is a checkouted version of SVN repo. I mean .svn folders are placed on web server. I don't use web publishing.
And I want to display current project revision (whole web site) in footer. How can I do that?
If I were using web publishing, I could determine revision on build/publish and write it as static html.
So how to get revision dynamically? Read .svn files directly? Are there better ways?
I saw other such questions, but answer was using SubWCRev.exe, it isn't unfortunately acceptable.
Edit: Tarn gave interesting idea about SVN hooks on commit. Any other ideas?
use keyword substitution. enable substitution for the files you want to display revision information, and put a keyword, like $Revision: 144 $, there.
note that
$Rev$ expands to show the last
revision in which the file changed,
not the last revision to which it was
updated
(see link above). if you want to show the global repository revision number, you better use svnversion.
also, see Related.
You can write hooks for SVN. You could write a hook to update a file with the current build as part of your checkout process. Then you can read, cache and display that build number on your site.
This previous question on SO has some discussion that might be useful to you: Always Commit the same file with SVN.
I've always done it by running a script that would use sed to replace a comment with the current timestamp in my $Rev$ file. That way, the file contents would change and Subversion would commit it. Somewhat manual, but you could write a script to first do that, and then do the actual svn commit command.
If want to display the latest revision number of your entire/repository or branch, keyword substitution will not help, I think a better solution would be to use a Build Management/Continuous Integration software, like CruiseControl.NET or TeamCity with a good build script.
Duplicate of:
How do I sync the SVN revision number with my ASP.NET web site?
ASP.NET Display SVN Revision Number
The only thing I can think of is to use the svn CLI binaries and call them from the page. That way you can strip out the rest and grab the revision number. To be honest though, its a somewhat ugly solution.

Best way to build trunk AND a branch on the same CruiseControl.Net server

We currently have a CruiseControl.Net server that is merrily building the trunk on our svn server. I have a new requirement to build the "latest" branch as well; is there a best practice in CruiseControl to handle this? What specific changes are needed to build from the trunk and a branch at the same time?
Make a second project just like the original where the source control is pointed to the proper branch.
As far as Cruisecontrol.net is concerned, a project is a project. It doesn't care whether it's a branch or a trunk. Simply setup another project in the ccnet.config that points to where the branch is located.
To keep things organized, i like to add the version number to the name of the branch projects like this:
ProjectX <- Trunk
ProjectX-4.0 <- Historical branch for v4.0
I generally create a new working directory named branch, set up the source control to monitor the branch and pull to the new folder. I also put in an exculusion filter on the trunk build so it does not get kicked off by a check in to the branch (our branches usually reside within the trunk realm of checking for changes). I also remember to change the labels, if we label, to reflect the branch naming convention. One very helpful thing you can do is if you will only ever have one branch active simply name it branch that way once you have your configuration all set You only have to comment or uncomment those parts in the config file as needed, instead of having to upgrade it in all the places like if one time it is branch 6.1 and next time it is 6.2, it saves a lot of cut and replace and I only have to changed the project name and the label the next time we use a branch.

Resources