[darcs-devel] adding feature: patch origins
darcs at owenstephens.co.uk
Sun Feb 10 23:30:47 UTC 2013
On 10 February 2013 22:42, Sebastian Fischer <mail at sebfisch.de> wrote:
> 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.
I like the idea.
> 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
and presumably with some short-hand for the case where the creator/applier are
the same, or if the patch hasn't originated elsewhere?
> 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.
I don't understand why you need a flag? Any commands that don't use the
information just wouldn't read the file storing the patch-applier data? When
new darcs (with this feature) run `darcs cha` they can check for, and display
applier information from the file, if it exists.
> 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?
Where should the applier details come from, in the case of push? (Darcs
implements push by creating a patch bundle of the patches to push and invoking
a remote darcs process to apply the bundle.) I imagine you would want the
person who pushed the patches to show up as the applier, not the remote user
that executes darcs? What happens if the remote darcs is older, and doesn't
know anything about this feature (i.e. you can't just stick something extra in
the remote invocation arguments)
More information about the darcs-devel