简体   繁体   中英

Subversion, how can I get from a revision number to a branch?

Our code base has quite a few branches, is there any way I can be given a revision number and from that find which branch the revision number was in?

thanks T

is there any way I can be given a revision number and from that find which branch the revision number was in?

No, in common sense - revisions in Subversion are global , per repository (ie each revision fixes the state of all objects in all nodes of repository)

If your task is "identify, which part of tree was affected by revision N", you have, as @MPi wrote, use svn log -q -v -r N command and get log for the root of repository (ie no pre-filter for revisions will be applied), piped to grep for extracting only changed files

In theory, there need not be any connection between a revision number and a branch. One revision can, in fact, commit to many branches (and even tags) at the same time.

However, you can query the log for a certain revision and try to figure out the branch, and if the commits are well-behaved, you will get a decent result:

$ svn log -v -r 91871 # if in working copy
$ svn log -v -r 91871 https://192.0.0.32/repo # with repository URL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM