Thread: Re: [Codestriker-user] topics using diffs from subversion repositories
Brought to you by:
sits
From: Giuseppe S. <giu...@an...> - 2006-05-23 03:05:16
|
David, Thanks for your reply. I think the issue boils to allow the user to specify two paths. Since subversion allows the "@" notation to specify versions to diff (see below), this could be easily achieved extending the usage of the existing "Start tag" and "End tag" fields. ** Scenario 1: diffs from different revisions on the same path Example: reviewing latest changes to the trunk. Field usage is currently: Start tag: 56 End tag: HEAD Module: /trunk/dir1 which translates into svn diff -r 56:HEAD --old=svn://my-repos /trunk/dir1 An alternative usage could be added, which would also allow for scenario 2 below: Start tag: /trunk/dir1@56 End tag: /trunk/dir1@HEAD Module: <empty> This should translate into svn diff --old=svn://my-repos/trunk/dir1@56 \ --new=svn://my-repos/trunk/dir1@HEAD This same command syntax could also be used with the first field usage: if field "Module" is empty, append the contents of "Start tag" and "End tag" directly to the repository path, otherwise prepend them first with the content of "Module" and an "@" character. ** Scenario 2: diffs from revisions on different paths This is impossible in Codestriker 1.9.2, but a common situation in svn repositories. Example 1: review changes made in a branch before merging back to trunk. svn diff --old=svn://my-repos/branches/rel1/dir1@56 \ --new=svn://my-repos/trunk/dir1@HEAD Using the second field usage from scenario 1, this could be achieved with: Start tag: /branches/rel1/dir1@56 End tag: /trunk/dir1@HEAD Module: <empty> Example 2: review changes made in a branch since branching off from trunk. svn diff --old=svn://my-repos/trunk/dir1@33 \ --new=svn://my-repos/branches/rel1/dir1 where rev. 33 is where the branch was created, and the HEAD of the branch is selected by default. Start tag: /trunk/dir1@33 End tag: /branches/rel1/dir1 Module: <empty> Example 3: review all files in revision 66. (this is a bit of a hack, since it's a diff between two directories that have no files in common, but it works and it is useful when you want to review the lot, not just files that have changed) svn diff --old=svn://my-repos/@1 \ --new=svn://my-repos/trunk/dir1@66 Start tag: /@1 End tag: /trunk/dir1@66 Module: <empty> HOWEVER, there are at least two downsides to my suggestion: 1. The names associated to entry fields would become even more misleading. As it is now, when using a subversion reporitory "Start tag" should really be "Start revision". With the above proposal it should become something like "Start path@rev", or better "Start peg", in svn talk. But this would be incompatible with non-subversion repositories. 2. "svn diff" has some options that could be useful to users. For example "--no-diff-deleted", that would skip files that are no longer present in the new revision. A checkbox could be added for this, but it would only make sense for svn repositories. Maybe a generic "diff options" field could be added, that would also work for CVS and others. What do you think? Giuseppe ---- > Hi Giuseppe, > > Yes, what you are asking for is currently only available for CVS > repositories, partly because CVS makes it very easy to implement these > different scenarios all via the cvs rdiff command, and using the special > revision "1.0" which exists for all files. > > What Codestriker needs at the end of the day is diff text to create the > topic with. If you can show me for each scenario below what the svn > commands would be to create the unidiff file, I can put that into > Codestriker. > > I suspect this could be tricky... but hope I am wrong. I don't know > Subversion very well I'm afraid. > > Jason can answer this far better than me. > > Cheers, > David > > Giuseppe Scelsi wrote: > > Hello, > > > > I am currently using CodeStriker 1.9.2. Can anyone tell me if there is > > currently a way to create a topic loading from a subversion repository a > > /single revision/ of a file or directory? > > > > The pop-up help it seems to indicate that leaving the "end tag" empty > > should do the trick, but that doesn't seem to work, svn expects both > > tags. I tried many other combinations, but it seems to me that some > > code surgery is needed. The only thing I have been able to do was to > > load a diff between two revisions belonging to the same path. > > > > Is anyone aware of plans to fix this in a future release? It would be > > very useful to be able to load a single revision of a path, as well as > > diffs between two different revisions of /two different paths/ (say diff > > rev. 40 on a branch against rev. 30 on the trunk). > > > > Cheers, > > > > Giuseppe |
From: Jason R. <jre...@ya...> - 2006-05-23 12:24:51
|
Hi, These are all legitimate uses. I don't think it would be that hard to add them in. You would need to modify the code that checks the params, and them modify the Subversion.pm module. Now, if you are not up for that, you can always issue the svn diff command yourself from a local working copy and upload the topic text. It will stick allow the use of the parallel view, so there is nothing wrong with the "svn diff, topic upload" way of creating a topic. In general the create topic text window is very confusing because codestriker needs to support a bunch of different revision control systems. It forces us to force fit everything into cvs speak. A further enhancement would be change the labels of the start,end,module to svn speak when a svn repository is selected via some java script. Lastly, your email is very nicely lays out all of the ways svn can be used. It would be good to put a section in the manual like your email to show what can be done directly and what has to be created with svn diff (like the --no-diff-deleted options). Thanks Jason --- Giuseppe Scelsi <giu...@an...> wrote: > David, > > Thanks for your reply. I think the issue boils to allow the user to > specify two paths. Since subversion allows the "@" notation to specify > versions to diff (see below), this could be easily achieved extending > the usage of the existing "Start tag" and "End tag" fields. > > > ** Scenario 1: diffs from different revisions on the same path > > Example: reviewing latest changes to the trunk. > > Field usage is currently: > > Start tag: 56 > End tag: HEAD > Module: /trunk/dir1 > > which translates into > > svn diff -r 56:HEAD --old=svn://my-repos /trunk/dir1 > > An alternative usage could be added, which would also allow for scenario > 2 below: > > Start tag: /trunk/dir1@56 > End tag: /trunk/dir1@HEAD > Module: <empty> > > This should translate into > > svn diff --old=svn://my-repos/trunk/dir1@56 \ > --new=svn://my-repos/trunk/dir1@HEAD > > This same command syntax could also be used with the first field usage: > if field "Module" is empty, append the contents of "Start tag" and "End > tag" directly to the repository path, otherwise prepend them first with > the content of "Module" and an "@" character. > > > ** Scenario 2: diffs from revisions on different paths > > This is impossible in Codestriker 1.9.2, but a common situation in svn > repositories. > > Example 1: review changes made in a branch before merging back to trunk. > > svn diff --old=svn://my-repos/branches/rel1/dir1@56 \ > --new=svn://my-repos/trunk/dir1@HEAD > > Using the second field usage from scenario 1, this could be achieved > with: > > Start tag: /branches/rel1/dir1@56 > End tag: /trunk/dir1@HEAD > Module: <empty> > > Example 2: review changes made in a branch since branching off from trunk. > > svn diff --old=svn://my-repos/trunk/dir1@33 \ > --new=svn://my-repos/branches/rel1/dir1 > > where rev. 33 is where the branch was created, and the HEAD of the > branch is selected by default. > > Start tag: /trunk/dir1@33 > End tag: /branches/rel1/dir1 > Module: <empty> > > Example 3: review all files in revision 66. > > (this is a bit of a hack, since it's a diff between two directories > that have no files in common, but it works and it is useful when you > want to review the lot, not just files that have changed) > > svn diff --old=svn://my-repos/@1 \ > --new=svn://my-repos/trunk/dir1@66 > > Start tag: /@1 > End tag: /trunk/dir1@66 > Module: <empty> > > > HOWEVER, there are at least two downsides to my suggestion: > > 1. The names associated to entry fields would become even more > misleading. As it is now, when using a subversion reporitory "Start > tag" should really be "Start revision". With the above proposal it > should become something like "Start path@rev", or better "Start peg", > in svn talk. But this would be incompatible with non-subversion > repositories. > > 2. "svn diff" has some options that could be useful to users. For > example "--no-diff-deleted", that would skip files that are no longer > present in the new revision. A checkbox could be added for this, but > it would only make sense for svn repositories. Maybe a generic "diff > options" field could be added, that would also work for CVS and > others. > > What do you think? > > Giuseppe > > ---- > > > Hi Giuseppe, > > > > Yes, what you are asking for is currently only available for CVS > > repositories, partly because CVS makes it very easy to implement these > > different scenarios all via the cvs rdiff command, and using the special > > revision "1.0" which exists for all files. > > > > What Codestriker needs at the end of the day is diff text to create the > > topic with. If you can show me for each scenario below what the svn > > commands would be to create the unidiff file, I can put that into > > Codestriker. > > > > I suspect this could be tricky... but hope I am wrong. I don't know > > Subversion very well I'm afraid. > > > > Jason can answer this far better than me. > > > > Cheers, > > David > > > > Giuseppe Scelsi wrote: > > > Hello, > > > > > > I am currently using CodeStriker 1.9.2. Can anyone tell me if there is > > > currently a way to create a topic loading from a subversion repository a > > > /single revision/ of a file or directory? > > > > > > The pop-up help it seems to indicate that leaving the "end tag" empty > > > should do the trick, but that doesn't seem to work, svn expects both > > > tags. I tried many other combinations, but it seems to me that some > > > code surgery is needed. The only thing I have been able to do was to > > > load a diff between two revisions belonging to the same path. > > > > > > Is anyone aware of plans to fix this in a future release? It would be > > > very useful to be able to load a single revision of a path, as well as > > > diffs between two different revisions of /two different paths/ (say diff > > > rev. 40 on a branch against rev. 30 on the trunk). > > > > > > Cheers, > > > > > > Giuseppe > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Codestriker-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codestriker-user > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |