Boris Feld <boris.feld@octobus.net> [Thu, 20 Sep 2018 17:47:05 +0200] rev 39889
shelve: find shelvedctx from bundle even if they are already in the repo
We use the new "duplicates" node tracking to find the tip of the bundle even if
it already exists in the repository.
Such logic is not supposed to be needed in theory. If the shelve was made using
internal-phase, we already know its node. Otherwise, the bundle content should
have been stripped. However, handling it makes the shelve code more robust and
provide a good example of "revduplicates" usage.
Boris Feld <boris.feld@octobus.net> [Wed, 19 Sep 2018 12:19:28 +0200] rev 39888
shelve: return the shelved node as part of bundle application
It make sense to have the function in charge of unbundling the shelved revision
also return the node of that revision (when the data is in the bundle).
This will help us to handle unnatural state where the unshelved change already
exists in the repository.
Boris Feld <boris.feld@octobus.net> [Thu, 20 Sep 2018 11:18:28 +0200] rev 39887
changelog: keep track of duplicated node in the transaction adding them
The transaction is already tracking the new nodes. We now tracks the
"duplicates" in the same location.
Boris Feld <boris.feld@octobus.net> [Wed, 19 Sep 2018 21:02:47 +0200] rev 39886
revlog: add a callback "tracking" duplicate node addition
If a changegroup contains node already added to the repository, they will be
skipped. Skipping them is the right behavior (we don't need to store things
twice), but it can hide some information to the code doing the unbundle (eg:
shelve looking for the tip of the bundle).
The first step to improve this situation is to add a low level callback. We do
not need this tracking on all revlog, so actual tracking will be added in the
next changeset.