Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make purges into merges #51

Open
orao opened this issue Mar 8, 2016 · 5 comments
Open

Make purges into merges #51

orao opened this issue Mar 8, 2016 · 5 comments

Comments

@orao
Copy link
Collaborator

orao commented Mar 8, 2016

A purge, keep or defunct transaction (on a stream) that clears the entire contents of the stream effectively performs a git rebase action. However, this is not entirely true since Accurev never loses history so the fact that a change was undone remains on the stream's (branch's) history. Hence, it would probably be the best case workaround to make a MergeIntoParent() function that checks if a stream (which isn't timelocked) matches the contents of its parent after a transaction (be it a promote, purge, defunct or otherwise) and if it does we will create a new commit on the parent stream (making sure to update all the children but not snapshots as well) that merges this stream into the parent.

This way we can avoid long ladder chains and squash an effectively empty stream to its parent stream.

@orao
Copy link
Collaborator Author

orao commented Mar 8, 2016

As well as merging up into the parent we should probably consider reversing the direction of the merges done by MergeIntoChildren() so that it collects all the empty children into an octopus merge (which shouldn't really ever occur if the merging into parent is correct but will be a good backup).

@orao
Copy link
Collaborator Author

orao commented Mar 17, 2016

Commit d0cd738, which resolved issue #49, is loosely related to the issue discussed here. It attempts to mitigate the graph going hectic by removing ladders in a slightly different way.

@orao
Copy link
Collaborator Author

orao commented Apr 5, 2016

The best way to address this would be to check all of the child streams that are not timelocked for whether they are the same as this stream at the next promote into this stream and create an octopus merge point with all the child streams that diff the same as additional parents... This would make sure that we eventually collect all children that have been purged of changes.

@orao orao added this to the Version 0.5 milestone Apr 6, 2016
@orao orao self-assigned this Apr 6, 2016
orao referenced this issue in Aperion/ac2git Apr 8, 2016
@orao
Copy link
Collaborator Author

orao commented Apr 11, 2016

Solving this would also solve issue #60.

@orao
Copy link
Collaborator Author

orao commented Apr 12, 2016

The strategy of gathering all empty child streams and merging them into our next commit would also resolve #69 and #60.

@ghost ghost unassigned orao Sep 7, 2016
@ghost ghost modified the milestones: Future, Version 0.6 Sep 7, 2016
@orao orao modified the milestones: v0.7, Future Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant