On 23.10.2013 18:17, Branko Čibej wrote:
> On 23.10.2013 18:06, Julian Foad wrote:
>> Branko Čibej wrote:
>>
>>> On 23.10.2013 15:53, Julian Foad wrote:
>>>> Gabriela Gibson wrote on 13 October:
>>>>> my branch has grown into a veritable forest, and so, I thought that
>>>>> it would be convenient to present the net code changes
>>>> ... and the discussion went on to address how to use "svn diff" in the
>>>> right way to show such changes, which is not exactly obvious. The best
>>>> way is to go and investigate your merge history and then choose specify
>>>> the left hand side of the diff as the revision on trunk which you last
>>>> caught up to. Is that really the best we can do? No.
>>>>
>>>> This requirement is fairly basic and comes up quite often -- I have
>>>> recently heard from both customers and colleagues wanting to know how
>>>> to do it. I think we should have a built-in way to say "show me the diff
>>>> of this branch against the parent branch, specifically against the latest
>>>> catch-up point on the parent branch". The attached patch implements this,
>>>> using '-g'/'--use-merge-info' to trigger it:
>>>>
>>>> cd my-branch-wc
>>>> svn diff -g ^/subversion/trunk .
>>>>
>>>> What does everyone think of the concept? The user interface? This
>>>> patch is by no means a complete solution, but simply to promote
>>>> discussion.
>>> Without the -g, please. Diff should just dtrt; it should know when
>>> branches are related, shouldn't it? And AFAICT, it already does the
>>> right thing.
>> Perhaps you missed the point. Without '-g', "svn diff -g ^/subversion/trunk ." shows us the difference between the *current* state of trunk and the current state of our branch. That's fine if you've just moments ago done a catch-up and told everybody else to hold off committing for a short while; but the use case we're addressing here is where want the diff between an *older* state of trunk (whatever state we last caught up to) and the current state of our branch.
>
> Well, I fail to see how "use mergeinfo" is in any way intuitive of the
> proposed semantics.
>
> Instead of retrofitting this yet-another-catch-all option, we should
> just go and design branch naming instead; then we could have a magical
> kind of name that means "branch root". I dislike off-the-cuff
> solutions, as you well know.
>
> Another option -- somewhat less dependent on a completely new feature
> -- might be this:
>
> svn diff -rROOT:HEAD
>
> Surely Subversion should be able to figure out when a branch was created.
Sorry, I meant
svn diff -rMERGED:HEAD
for the last-merged case. But ROOT is also a useful revision keyword.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-10-23 18:20:22 CEST