revision

SVN: Is it possible to get the list of revision numbers for given path?

强颜欢笑 提交于 2019-12-30 01:54:10
问题 I am making a PHP tool that connects to a repository, downloads the list of commits and stores them locally. However, due to the possibility that certain repositories are HUGE and grabbing their log results in long waiting time and possible time-outs/errors, I would like to download each commit message using async requests. So, I have a start and end points in revision history, and I can grab all logs like this: svn log -r <from_revision>:<to_revision> <REPO_URL> ... and I will possibly end

GIT: determine revision based on a file

不想你离开。 提交于 2019-12-29 07:34:15
问题 I have a file from a project that uses GIT as repository. For that file I need to find out to which revision this file belongs to. The file is stand-alone outside of an repository (not tracked) therefore the standard git commands do not work. Is there a way to determine the revision this file belongs to only based on it's filename and it's content? 回答1: I don't think there's a one-shot command to do this - git's object model makes it quite laborious to work back from a blob to commits that

How to clone git repository with specific revision/changeset?

半城伤御伤魂 提交于 2019-12-27 10:21:33
问题 How can I clone git repository with specific revision, something like I usually do in Mercurial: hg clone -r 3 /path/to/repository 回答1: UPDATE 2 Since Git 2.5.0 the feature described below can be enabled on server side with configuration variable uploadpack.allowReachableSHA1InWant , here the GitHub feature request and the GitHub commit enabling this feature. Note that some Git servers activate this option by default, e.g. Bitbucket Server enabled it since version 5.5+. See this answer on

How to clone git repository with specific revision/changeset?

帅比萌擦擦* 提交于 2019-12-27 10:21:11
问题 How can I clone git repository with specific revision, something like I usually do in Mercurial: hg clone -r 3 /path/to/repository 回答1: UPDATE 2 Since Git 2.5.0 the feature described below can be enabled on server side with configuration variable uploadpack.allowReachableSHA1InWant , here the GitHub feature request and the GitHub commit enabling this feature. Note that some Git servers activate this option by default, e.g. Bitbucket Server enabled it since version 5.5+. See this answer on

How to get SVN revision in Gradle for Android?

时光毁灭记忆、已成空白 提交于 2019-12-24 13:32:11
问题 I have field (svn revision) in resource. How can I get svn revision in my field using by Gradle, that not to do that by my hands? 回答1: You could modify the following solution, explained here, which prints out the current SVN revision. // File: build.gradle task svninfo << { new ByteArrayOutputStream().withStream { os -> def result = exec { executable = 'svn' args = ['info'] standardOutput = os } def outputAsString = os.toString() def matchLastChangedRev = outputAsString =~ /Last Changed Rev:

How do I determine the revision number of an Android build?

六眼飞鱼酱① 提交于 2019-12-23 21:21:05
问题 I know how to get the API level, android.os.Build.VERSION.SDK_INT, but there are also several revisions of each level release, e.g. for 2.1 there's rev 1 and 2. How do I determine the revision of a build? The reason i'd like to know this is that I have a workaround for a bug in Android 2.1 (and 2.2), and this workaround will break the moment the corresponding bug is fixed. So right now i'm in the odd position of hoping that the bug won't be fixed (at least not until I can find an answer to

How to diff a file with specific revision in git?

只谈情不闲聊 提交于 2019-12-22 11:56:33
问题 I don't know if git has concept of revision. I'd like to diff current working copy with older version of it(not neccesarily a last commit) Would be great if it could be done inside emacs. 回答1: I've no idea about doing this inside emacs, but: git diff rev1..rev2 will do what you want for the whole repository. You can then add to that: git diff rev1>..rev2 path path can be an absolute path to a file, or a path to a directory, so you can diff subtrees. If you're looking to diff the working copy

SVN Version Rollback Question

别说谁变了你拦得住时间么 提交于 2019-12-22 05:10:06
问题 I'm using SVN (TortoiseSVN) and often came into the following situation: I wanted to discard any changes since a specific (old) revision and turn all files back to this specific (old) version. Then I wanted to work further as if this specific (old) revision was the newest one, i.e. I wanted to be able to commit the specific old revision as a new revision. I found several solutions for this problem (for example stackoverflow.com/questions/402159/roll-back-or-revert-entire-svn-repository-to-an

Can I edit the message of an older revision in Bazaar?

北战南征 提交于 2019-12-22 04:35:22
问题 How can I edit an older revision's message to more correctly describe its changes? 回答1: You cannot edit the commit message of an old revision without changing the revision id of the modified revision and all its descendants. Well... technically you can, if you try hard enough, but the technical term for the result is "corrupt repository". A repository in bzr is a replica of a distributed database of revisions, and if all replicas don't agree on the content of a revision, you have an integrity

Git checkout to commit number N

与世无争的帅哥 提交于 2019-12-22 00:12:45
问题 I use number of commits as version of my program (Using hash of commit as version very inconvenient, becouse it not sequential). So I obtain commit number: git rev-list --count HEAD For example for current state it reurns 53. Can I do checkout to commit number 35 ? Or obtain hash of commit number 35 ? 来源: https://stackoverflow.com/questions/28671503/git-checkout-to-commit-number-n