Thinking about tickets:
I think this is a more simple idea than these tickets. The idea is to define each branch as 2 components: the history and the patchset
- The patchset is the set of patches currently included in the branch. Without “official” order.
- The history is the sorted sequence of actions executed in the branch. Valid actions are:
- Add a patch to the patchset of the branch by recording or pulling/pushing it.
- Remove a patch from the patchset of the branch by unrecording or pulling/pushing it.
- Every action realized in the branch is recorded in him history.
The benefits of having a history are:
- The user can recover the exact patchset used in any time in the branch by position in the history. Then, by positions in the branch, in the official repository, we can identify any historical and official “snapshot” of source code.
- Pulling and pushing can be implemented with complexity linear to the number of new changes in history (added/removed patches from the patchset) in the ideal case.
- In the nest, when i wish to see the recent changes in any repository, i can see the recent changes in the history, that always is lineal, with immutable past. Without lost the flexibility in the patchset, that have no order.