darcs

Issue 557 new safer unpull command (unpull 'against' remote repo to avoid unpulling local patches)

Title new safer unpull command (unpull 'against' remote repo to avoid unpulling local patches)
Priority feature Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, panu.kalliokoski, thorkilnaur, tommy, zooko
Assigned To
Topics

Created on 2007-10-30.18:59:39 by panu.kalliokoski, last changed 2017-07-30.23:05:30 by gh.

Messages
msg2207 (view) Author: panu.kalliokoski Date: 2007-10-30.18:59:28
As is well known, darcs permits some dangerous actions, such as
unpulling a patch that was never pulled, or amending a patch that has
already been distributed.  It seems to me that these dangerous actions
could be prevented by relatively simple measures.

For instance, unpull and obliterate could be separated so that unpull
requires the user to specify a repository "from which" the patch is
unpulled.  darcs unpull would then refuse to unpull the patch if the
patch did not exist in that repository.  The repository would naturally
default to the same repository as with darcs pull, darcs push etc.  This
way, it would be impossible to unpull the last copy of a patch, because
to unpull it, there must always be a repository where it still exists.

Another measure, not much more complicated, would be a feature to track
whether a patch has been distributed.  Every repository could simply
have a list of not-yet-distributed patches and protect against
unrecording or amending patches that have been distributed.

Panu
msg2233 (view) Author: zooko Date: 2007-11-04.15:48:26
> For instance, unpull and obliterate could be separated so that unpull
> requires the user to specify a repository "from which" the patch is
> unpulled.  darcs unpull would then refuse to unpull the patch if the
> patch did not exist in that repository.  The repository would  
> naturally
> default to the same repository as with darcs pull, darcs push etc.   
> This
> way, it would be impossible to unpull the last copy of a patch,  
> because
> to unpull it, there must always be a repository where it still exists.

+1

But by the way, I still believe that "unpull" is a confusing name  
that should be deprecated.  If you create a patch and push it and  
then "unpull" it what happens?  Well, what happens is fine, except  
that the user is confused and doesn't understand why you can unpull  
something that you didn't pull.  This isn't just my own personal  
intuition -- it is something that I have personally witnessed more  
than once.  (It also matches my own personal intuition.)

> Another measure, not much more complicated, would be a feature to  
> track
> whether a patch has been distributed.  Every repository could simply
> have a list of not-yet-distributed patches and protect against
> unrecording or amending patches that have been distributed.

+1

Regards,

Zooko
msg8541 (view) Author: kowey Date: 2009-08-27.16:10:17
See somewhat related issue75 (which wants unobliterate)
History
Date User Action Args
2007-10-30 18:59:42panu.kalliokoskicreate
2007-11-04 15:48:27zookosetstatus: unread -> unknown
nosy: + darcs-devel, zooko
messages: + msg2233
2008-02-10 02:41:30markstossetstatus: unknown -> deferred
nosy: droundy, tommy, beschmi, kowey, darcs-devel, zooko, panu.kalliokoski
title: Wishlist bug: add safety guards against well-known dangerous actions -> wish: add safety guards against well-known dangerous actions
2009-08-06 17:40:23adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, dagit, mornfall, simon, thorkilnaur, - droundy, panu.kalliokoski
2009-08-06 20:37:34adminsetnosy: - beschmi
2009-08-10 22:09:24adminsetnosy: + panu.kalliokoski, - markstos, jast, dagit, Serware, mornfall
2009-08-25 17:53:56adminsetnosy: - simon
2009-08-27 13:54:47adminsetnosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, panu.kalliokoski, dmitry.kurochkin
2009-08-27 16:10:19koweysetpriority: wishlist -> feature
status: deferred -> needs-implementation
messages: + msg8541
nosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, panu.kalliokoski, dmitry.kurochkin
title: wish: add safety guards against well-known dangerous actions -> new safer unpull command (unpull 'against' remote repo to avoid unpulling local patches)
2009-08-27 16:11:21koweysetnosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, panu.kalliokoski, dmitry.kurochkin
2017-07-30 23:05:30ghsetstatus: needs-implementation -> given-up