Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
Currently, Changelog plugin don't support Subversion's tag.
This patch make The "tag" type report available even if you are using Subversion.
This gets each revision of tags in Subversion system, and generates the log-report between those revisions.
For example, assume you have following repositoy structure:
http://example.com/svn/project
+trunk/
| +src/
| ...
+tags/
| +1.0/
| +1.1/
| +1.2/
| +2.0/
| +2.1/
+branches/
+1.x/
To generate svn log's between 1.1 and 1.2 tag in 1.x branch:
[pom.xml]
... <!-- Subversion repositoy --> <scm> <!-- svn connection --> <connection>scm:svn:http://example.com/svn/project</connection> </scm> ... <reporting> <plugins> <!-- changelog-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <version>2.2.1</version> <configuration> <!-- type is "tag" --> <type>tag</type> <tags> <!-- between 1.1 and 1.2 tag --> <tag implementation="java.lang.String">1.2</tag> <tag implementation="java.lang.String">1.1</tag> </tags> <!-- in 1.x branch --> <branchBase>branches/1.x</branchBase> <!-- encoding --> <outputEncoding>Windows-31J</outputEncoding> </configuration> </plugin> </plugins> </reporting> ...
To generate svn log-report between 2.1 and 2.0 tag in trunk:
[pom.xml]
... <!-- Subversion repositoy --> <scm> <!-- svn connection --> <connection>scm:svn:http://example.com/svn/project</connection> </scm> ... <reporting> <plugins> <!-- changelog-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <version>2.2.1</version> <configuration> <!-- type is "tag" --> <type>tag</type> <tags> <!-- between 2.1 and 2.0 tag --> <tag implementation="java.lang.String">2.0</tag> <tag implementation="java.lang.String">2.1</tag> </tags> <!-- in trunk (Default brancheBase is trunk. So, branchBase element is optional when to use trunk. ) --> [<branchBase>trunk</branchBase>] <!-- encoding --> <outputEncoding>Windows-31J</outputEncoding> </configuration> </plugin> </plugins> </reporting> ...
Activity
Dennis Lundberg
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
Currently, Changelog plugin don't support Subversion's tag. This patch make The "tag" type report available even if you are using Subversion. This gets each revision of tags in Subversion system, and generates the log-report between those revisions. For example, assume you have following repositoy structure: http://example.com/svn/project +trunk/ | +src/ | ... +tags/ | +1.0/ | +1.1/ | +1.2/ | +2.0/ | +2.1/ +branches/ +1.x/ To generate svn log's between 1.1 and 1.2 tag in 1.x branch: [pom.xml] ... <!-- Subversion repositoy --> <scm> <!-- svn connection --> <connection>scm:svn:http://example.com/svn/project</connection> </scm> ... <reporting> <plugins> <!-- changelog-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <version>2.2.1</version> <configuration> <!-- type is "tag" --> <type>tag</type> <tags> <!-- between 1.1 and 1.2 tag --> <tag implementation="java.lang.String">1.2</tag> <tag implementation="java.lang.String">1.1</tag> </tags> <!-- in 1.x branch --> <branchBase>branches/1.x</branchBase> <!-- encoding --> <outputEncoding>Windows-31J</outputEncoding> </configuration> </plugin> </plugins> </reporting> ... To generate svn log-report between 2.1 and 2.0 tag in trunk: [pom.xml] ... <!-- Subversion repositoy --> <scm> <!-- svn connection --> <connection>scm:svn:http://example.com/svn/project</connection> </scm> ... <reporting> <plugins> <!-- changelog-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <version>2.2.1</version> <configuration> <!-- type is "tag" --> <type>tag</type> <tags> <!-- between 2.1 and 2.0 tag --> <tag implementation="java.lang.String">2.0</tag> <tag implementation="java.lang.String">2.1</tag> </tags> <!-- in trunk (Default brancheBase is trunk. So, branchBase element is optional when to use trunk. ) --> [<branchBase>trunk</branchBase>] <!-- encoding --> <outputEncoding>Windows-31J</outputEncoding> </configuration> </plugin> </plugins> </reporting> ... |
Currently, Changelog plugin don't support Subversion's tag. This patch make The "tag" type report available even if you are using Subversion. This gets each revision of tags in Subversion system, and generates the log-report between those revisions. For example, assume you have following repositoy structure: {noformat} http://example.com/svn/project +trunk/ | +src/ | ... +tags/ | +1.0/ | +1.1/ | +1.2/ | +2.0/ | +2.1/ +branches/ +1.x/ {noformat} To generate svn log's between 1.1 and 1.2 tag in 1.x branch: [pom.xml] {code:xml} ... <!-- Subversion repositoy --> <scm> <!-- svn connection --> <connection>scm:svn:http://example.com/svn/project</connection> </scm> ... <reporting> <plugins> <!-- changelog-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <version>2.2.1</version> <configuration> <!-- type is "tag" --> <type>tag</type> <tags> <!-- between 1.1 and 1.2 tag --> <tag implementation="java.lang.String">1.2</tag> <tag implementation="java.lang.String">1.1</tag> </tags> <!-- in 1.x branch --> <branchBase>branches/1.x</branchBase> <!-- encoding --> <outputEncoding>Windows-31J</outputEncoding> </configuration> </plugin> </plugins> </reporting> ... {code} To generate svn log-report between 2.1 and 2.0 tag in trunk: [pom.xml] {code:xml} ... <!-- Subversion repositoy --> <scm> <!-- svn connection --> <connection>scm:svn:http://example.com/svn/project</connection> </scm> ... <reporting> <plugins> <!-- changelog-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <version>2.2.1</version> <configuration> <!-- type is "tag" --> <type>tag</type> <tags> <!-- between 2.1 and 2.0 tag --> <tag implementation="java.lang.String">2.0</tag> <tag implementation="java.lang.String">2.1</tag> </tags> <!-- in trunk (Default brancheBase is trunk. So, branchBase element is optional when to use trunk. ) --> [<branchBase>trunk</branchBase>] <!-- encoding --> <outputEncoding>Windows-31J</outputEncoding> </configuration> </plugin> </plugins> </reporting> ... {code} |
Jerome Lacoste
made changes -
| Attachment | MCHANGELOG-79_0001-Add-support-for-svn-tag-diffs.-Redo-the-original-MCH.patch [ 45467 ] |
Dennis Lundberg
made changes -
| Patch Submitted | [Yes] |
Samuel Van Reeth
made changes -
| Attachment | MCHANGELOG-79-Add-support-for-svn-tag-diffs-New-Patch-no-BranchBase-property.patch [ 60805 ] |
New version of the patch.
The original patch wasn't working for me when testing changelogs for various tags. The problem was caused by the way the SvnInfoCommand was used, and the way plexus-utils has evolved I guess: the executed command ended up being:
cd $workingDir$svnTag && ....
causing the command line to fail.
I've forked the SvnInfoCommand into an SvnInfoCommandExpanded and packaged it into the changelog plugin to make it quick to test the changes. The proper fix would be to propagate the changes of SvnInfoCommandExpanded into the maven-svm-provider-svn project.
I haven't tested all use cases specified by this patch and chose to let the original code as much as possible. I haven't added unit tests...
Let me know if you need further info/code.