[darcs-devel] adding feature: patch origins
mail at sebfisch.de
Sun Feb 10 22:42:54 UTC 2013
currently `darcs changes` shows information about patches that is
independent of the repository, like its author and creation date,
i.e., when it was recorded.
I would like to add a feature to `darcs changes` to show information
about who added a patch to the current repository (and when it was
added.) This information would typically differ from the currently
shown info if a patch has been recorded in a different repository and
applied to the current repository using a sent patch bundle or by
pushing/pulling from a different repository.
Here is, how it could look like:
$ darcs changes --last=1 --print-origin
Sun Feb 10 15:32:44 CET 2013 Sebastian Fischer <sebfisch at example.com>
pulled: Sun Feb 10 20:32:44 CET 2013 Somebody Else <name at example.com>
* patch name
log message given as description of the patch
I looked at the documentation for the new patch index (at
http://darcs.net/Internals/PatchIndex) to see if something like this
can be done with it already, but it does not seem to track the
additional information needed.
I would like to implement origin tracking in a way that does not
influence commands that don't use it. So it seems that other commands
need an option to record the additional information, like
darcs pull --track-origin
and similar, for push and apply.
It seems that patch origins can be stored in a file patch_origins
similar to how the patch index is stored.
Does this approach sound reasonable? Are there better approaches to
implement this feature? Do you foresee pitfalls that I should avoid?
Would you be willing to incorporate this feature into darcs?
More information about the darcs-devel