darcs

Issue 2632 Can we scrap patch bundles with "context"?

Title Can we scrap patch bundles with "context"?
Priority Status unknown
Milestone Resolved in
Superseder Nosy List bfrk
Assigned To
Topics

Created on 2019-08-05.11:38:28 by bfrk, last changed 2019-08-06.09:28:43 by ganesh.

Messages
msg21022 (view) Author: bfrk Date: 2019-08-05.11:38:25
When we create patch bundles we allow to pass a 'Tree' so that we can
use showContextPatch. This complicates things considerably and IMHO is
not very usefull. I mean, how often does Joe Average User look at the
raw content of a patch bundle? My guess is: exactly 0 times. I have done
it occasionally, but I am certainly not a normal user, and did it only
because there is no command that allows me to view what a patch bundle
would do when applied.

So my plan is to scrap the existing feature and instead add an option
for 'darcs diff' that takes a patch bundle as argument. With this
option, it will display the changes made by the bundle relative to the
pristine state.

Any objections?

Cheers
Ben
msg21023 (view) Author: ganesh Date: 2019-08-05.13:12:14
Personally I often review patches on the tracker using
patch-preview.txt,  which I guess is generated from the same 
information. It's quicker than downloading the patch locally for
easy reviews. I also not a normal user though.
msg21037 (view) Author: bfrk Date: 2019-08-05.22:40:37
> Personally I often review patches on the tracker using
> patch-preview.txt,  which I guess is generated from the same 
> information. It's quicker than downloading the patch locally for
> easy reviews. I also not a normal user though.

Yes, the patch-preview.txt is useful, I also use it occasionally. But it
doesn't contain context lines. This is because nowadays
--minimize-context is on by default and that precludes the use of
showContextPatch. Lifting this limitation is possible but non-trivial.
It's the same problem that currently makes showing contexted hunks
useless in interactive mode: we would have to track the state to get the
correct context (context here means: surrounding lines).

More generally, I think we should rather move towards improving darcsden
with an "apply request" feature, akin to what github introduced with
their "pull requests". So when I clone a repo from hub.darcs.net, make a
change, record that, then say 'darcs send', this opens an "apply
request" in the issue tracker associated to the repo, where we can
discuss the patch, view its status (e.g. does it apply cleanly or are
there conflicts?) and also view its effect, ideally with side-by-side
listing of hunks. For darcsden it would be quite possible to store such
patches in a separate sibling repo, simulating an in-repo branch.
msg21038 (view) Author: ganesh Date: 2019-08-06.09:28:42
On 05/08/2019 23:40, Ben Franksen wrote:
> 
> Ben Franksen <ben.franksen@online.de> added the comment:
> 
>> Personally I often review patches on the tracker using
>> patch-preview.txt,  which I guess is generated from the same 
>> information. It's quicker than downloading the patch locally for
>> easy reviews. I also not a normal user though.
> 
> Yes, the patch-preview.txt is useful, I also use it occasionally. But it
> doesn't contain context lines.

Oh yes, and I hadn't even realised :-) No objections then.

> More generally, I think we should rather move towards improving darcsden
> with an "apply request" feature, akin to what github introduced with
> their "pull requests". So when I clone a repo from hub.darcs.net, make a
> change, record that, then say 'darcs send', this opens an "apply
> request" in the issue tracker associated to the repo, where we can
> discuss the patch, view its status (e.g. does it apply cleanly or are
> there conflicts?) and also view its effect, ideally with side-by-side
> listing of hunks. For darcsden it would be quite possible to store such
> patches in a separate sibling repo, simulating an in-repo branch.

Agreed. We do already have some support for sending patches to darcsden
but I don't think it's very usable in practice yet. (I wouldn't even
store the patches in a repo, they could just be shown/diffed on demand)
History
Date User Action Args
2019-08-05 11:38:28bfrkcreate
2019-08-05 13:12:16ganeshsetmessages: + msg21023
2019-08-05 22:40:39bfrksetmessages: + msg21037
2019-08-06 09:28:43ganeshsetmessages: + msg21038