Closed (fixed)
Project:
Version Control API
Version:
7.x-1.x-dev
Component:
API module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Sep 2011 at 19:52 UTC
Updated:
15 Apr 2014 at 22:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marvil07 commented@sdboyer: It would be great if you take a look at this patch before I commit it.
BTW the impact here is that now you can see the list of tags the commit is in on commitlog, that already shows all labels associations since #1043506: Use versioncontrol_handler_field_operation_labels views field handler to avoid operation duplicates
Comment #2
sdboyer commentedNo, I don't think I agree. I understand that Git treats them this way, but I think I'd prefer to continue to treat them as atomic and individual, rather than containing the full history. Not least because of how ridiculous the storage costs would be to store this data.
Is there a particular use case that you feel is deficient that made you want to add this?
Comment #3
marvil07 commentedActually the main reason I end up writing this patch is because I think versioncontrol concept of operation label encourage the backend to make associations between labels(as we defined them on vcs api: branches and tags) and operations. I mean, my main motivation is consistency with the requirements of the api.
So, if we really do not want to encourage this maybe it's a good idea to change main api: versioncontrol_operation_labels then should become versioncontrol_operation_branches on vcs api(i.e. rename table and views field).
Comment #4
sdboyer commentedI'm not opposed to separating the table (back) into two separate tables. I never really liked the 'labels' abstraction in the first place - another term that is unique to vcapi and clutters the conceptual space. But I don't quite agree that "api consistency" demands that all labels be the same, either. We do already provide a mapping of the tag to an operation, right? It's just that it's an atomic mapping, since we inherently assume that all vcses we work with are atomic (and fake it with CVS), as opposed to a full historical mapping, as with branches.
Comment #5
marvil07 commentedAn old issue I did not find when I created this issue that is a subset of this: #1072224: Add tags to operation label relations
About separating in two table I did not really see the benefit.
Not really, we only store the tag, but we never create a operation tag nor we store the relation on operation labels table.
I would definitely be in favour to store the relation on the operation labels table, it would be really cool to figure out through commitlog which commits where to which branches(i. e. figure out when a commit is released).
I would say to not store an operation tag, or maybe only do it when we have a real tag(annotated/signed).
Comment #6
marvil07 commentedLet's do this optionally to avoid at least triple the rows on versioncontrol_operation_labels table.
Comment #7
marvil07 commentedComment #8
marvil07 commentedComment #9
marvil07 commentedReflect current state.
Then, implement it at versioncontrol_git.
Comment #10
marvil07 commentedLet's see what bot thinks.
Comment #11
marvil07 commentedStill a little to do, patch later.
Comment #12
marvil07 commentedThese patches should be working correctly.
Tests confirm git log parsing is working correctly(VersioncontrolGitDataIntegrityTests and VersioncontrolGitEventDataIntegrityTests passed correctly).
@sdboyer: Pending on your review to add these patches upstream.Update: Sorry, still pending to teach the option value to the git backend.
Comment #13
marvil07 commentedOk, now it's ready for review.
Here some hints about variables for versioncontrol_git git_default reposync plugin options:
Notice this behavior is not retroactive(will not remove already added branches/tags) to preserve data, but I'm open to suggestions.
Comment #14
marvil07 commentedAfter reviewing this again I added it to 7.x-1.x, the patch for versioncontrol_git still needs some work, so I opened a new issue for that: #1985426: Implement versioncontrol reposync plugin option to store tag/commit relations optionally.
Back to NW for D6 version.
Comment #15
marvil07 commentedComment #16
marvil07 commentedSince 6.x-2.x entered in maintenance mode, this will not make it there.
Comment #17
marvil07 commentedRemoving unnecessary tags.