Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the source branch for a tag

Tags:

svn

I have a tag in subversion that has been made some time in the past. I would like to know what branch it was created from. Is there a way to do this. I have tried

svn log --stop-on-copy

But this only gives me the revision number, not the branch path. I need the branch path so I can check it out. Any ideas, preferably a SVN command line method here would be appreciated.

like image 854
ng. Avatar asked Jan 11 '11 01:01

ng.


People also ask

How can I tell which branch a tag is created?

So turns out, git log is the core command for the job: With a Tag you mark a reference. So when you are on a dev branch and Tag this state. Your tag is on the actual reference. So in this case you can look to gitk or another tool where the tree is shown.

What is the source branch in git?

The source repository is the developer's public repository and the source branch is the one that contains the proposed changes. If the developer is trying to merge the feature into the main codebase, then the destination repository is the official project and the destination branch is main .

Is git tag branch specific?

Tags and branch are completely unrelated, since tags refer to a specific commit, and branch is a moving reference to the last commit of a history. Branches go, tags stay. So when you tag a commit, git doesn't care which commit or branch is checked out, if you provide him the SHA1 of what you want to tag.

Does a tag belong to a branch?

No such thing. Tags point to commits, and branches point to commits. A single commit can be pointed at (or be a parent of) dozens of different branches; there is no way to narrow down one specific branch as "the owner of this tag".


1 Answers

svn log -v --stop-on-copy <url-of-the-tag> should give you this information as documented here.

Relevant excerpt:

In addition to the action codes which precede the changed paths, svn log with the
--verbose (-v) option will note whether a path was added or replaced as the result of 
a copy operation. It does so by printing (from COPY-FROM-PATH:COPY-FROM-REV) after such 
paths.
like image 103
Raghuram Avatar answered Oct 17 '22 01:10

Raghuram