[darcs-users] Suggestion: track patch origin metadata

Mark Stosberg mark at summersault.com
Fri Oct 22 12:46:18 UTC 2004


Darcs seems unique to me with its ability to allow you to "undo" some
things. I like this extra trust and freedom given to the user.  However,
I think there should be some additional safeguards to prevent data loss,
and difficult interactions with other users due to changed patches. 

I have in mind these specific goals:

1. Only allow modification of patches you created yourself and haven't
  been distributed. Don't allow unrecording/rerecording of patches of
  patches that originated here and have left, or that originated elsewhere.   

2. Don't allow unpulling of patches that originated here.

To implement these, I think two new bits of metadata are needed
to be tracked with each patch. I'll give them these names:

orig_here
orig_here_and_left

Compatibility issues
--------------------

Generally, darcs repos with and without these extra tags should be able
to communicate fine. However, once an old darcs is upgraded, one may
find that some "orig_here" tags have been blindly (and wrongly) copied
from another repo. After an upgrade to a version aware of these tags,
they will be need to reset.  

Since each repo tracks it's own metadata, there should not be much
confusion here, I would hope. 

Implementation
--------------

- darcs record will always record patchs with 'orig_here'

- Once the patch is copied out of the repo the first time, 
  the token is changed to "orig_here_and_left".

- Anytime a patch comes in from another repo, either token is removed. 

- unrecord, rerecord and unpull would be updated to check the tags
  before operating.

If there is serious disagreement in the community about the desirability
of these features, the modified of behavior of unrecord, rerecord and
unpull could be optional, controlled by a preference. 

I could possibly help with writing documentation and tests to go along
with this update.

Comments? 

	Mark

-- 
http://mark.stosberg.com/ 





More information about the darcs-users mailing list