top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to check which branches have specific commit in SVN?

0 votes
502 views

We have an svn repository with several branches and tags.

- trunk/
- branches/
 - stable_1
 - stable_2
 - etc.
- tags/
 - stable_1_release_a
 - stable_1_release_b
 - etc.

We develop our software in trunk (or in a development branch which will be reintegrated to trunk). We merge the changes from trunk to a stable branch. Sometimes we discover a bug which has been introduced quite some time ago. Because the list of branches becomes quite long, I would like to know if it is possible to easily see in which branches / tags the bug is?
So if for instance the bug was introduced in r50 in trunk and currently we are at r100, is there an svn command to see which branches / tags have r50 of trunk merged?

posted Feb 22, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Subversion currently doesn't track where something was branched to, only where something was branched from... so there is no feature that can tell you which of all locations miss a certain 'merge'.

For a specific branch you can see if it still needs specific merges via svn mergeinfo --show-revs=eligible

$ svn help mergeinfo
mergeinfo: Display merge-related information.

usage:
1. mergeinfo SOURCE[@REV] [TARGET[@REV]]
2. mergeinfo --show-revs=WHICH SOURCE[@REV] [TARGET[@REV]]

1) Summarize the history of merging between SOURCE and TARGET. The graph shows, from left to right:
the youngest common ancestor of the branches;
the latest full merge in either direction, and thus the common base
that will be used for the next complete merge;
the repository path and revision number of the tip of each branch.

2) Print the revision numbers on SOURCE that have been merged to TARGET (with --show-revs=merged), or that have not been merged to TARGET (with --show-revs=eligible). Print only revisions in which there was at least one change in SOURCE.

If --revision (-r) is provided, filter the displayed information to show only that which is associated with the revisions within the specified range. Revision numbers, dates, and the 'HEAD' keyword are valid range values.

SOURCE and TARGET are the source and target branch URLs, respectively. (If a WC path is given, the corresponding base URL is used.) The default TARGET is the current working directory ('.'). REV specifies the revision to be considered the tip of the branch; the default for SOURCE is HEAD, and the default for TARGET is HEAD for a URL or BASE for a WC path.

The depth can be 'empty' or 'infinity'; the default is 'empty'.

With some simple scripting you should be able to run this on all branches below a specific directory, etc.

answer Feb 22, 2017 by Kumar Mitrasen
Similar Questions
+1 vote

My most recent commit was the creation of a tag. I want to delete that tag. Should I reverse merge the commit or simply delete the tag?

If I do a reverse merge I see a tree conflict:

C:>svn merge -c -69  

--- Reverse-merging r69 into '.': 

 C tagsTAG_ 

--- Recording mergeinfo for reverse merge of r69 into '.': 

U . 

Tree conflict on 'tagsTAG_ 

 > local dir edit, incoming dir delete upon merge 

Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: 

What is the best thing to do here?

+1 vote

I see in pre-commit hook template that changing revisions properties in transaction are allowed.But I cant find way for it (I want change svn:author to more readable).

Is here way for this with svn, svnadmin, svnlook ... or other standard tool? Or I should use Subversion API and write simple tool?

+1 vote

We are using Subversion (SVN 1.6.12-r955802).

Since the Apache version 2.2.24 has some security issues (multi-site security issue), we have moved to Apache version 2.2.25. But this updated version has the second commit issue. Issue details are given below.

"The issue with Apache 2.2.25 is when you have 'space' in folder name / file name. The first commit of these files / folders (with space in the name) is successful. We are facing issue only when subsequent commit is happening. We are using Tortoise SVN as client"

+1 vote

I periodically receive this kind of errors -

X:>svn commit -m "BLA BLA" itextsharp.dll iTextSharp.xml
Sending iTextSharp.xml
Sending itextsharp.dll
Transmitting file data ..
svn: E135000: Commit failed (details follow):
svn: E135000: While preparing 'iTextSharp.xml' for commit
svn: E135000: Inconsistent line ending style
svn: E720032: Additional errors:
svn: E720032: Transaction '1718-1ca' cleanup failed
svn: E720032: Can't remove file 'Depotdbtxn-protorevs1718-1ca.rev': The process cannot access the file because it is being used by another process.

Question 1: Is there a way to have SVN normalize line ending on commit by itself?
Question 2: Why txn-protorevs aren't being cleaned up properly?

0 votes

Can anyone give me what is useful and when we actually use?

...