forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 141
transport: fixes for fast-import-based remotes #136
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
Open
dscho
wants to merge
5
commits into
gitgitgadget:master
Choose a base branch
from
dscho:remote-hg-prerequisites
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 tasks
283e71f
to
e5b9145
Compare
e5b9145
to
3f59a18
Compare
There are issues in commit 3f59a18: |
This makes it safer to use, as it avoids rev/file ambiguities. Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
After importing anything with fast-import, we should always let the garbage collector do its job, since the objects are written to disk inefficiently. This brings down an initial import of http://selenic.com/hg from about 230 megabytes to about 14. In the future, we may want to make this configurable on a per-remote basis, or maybe teach fast-import about it in the first place. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 25e0ca5 (Add new fast-export testcases, 2009-06-25), we introduced a test where `fast-export` was called with a commit range whose positive side was not a ref name, but a revision that refers to the parent of a ref. In such a case, the result of `fast-export` cannot be piped to `fast-import` to essentially recreate the same revisions because we do not have a proper ref name to work with. The introduced test case set the expectation that Git should transmogrify the `main~1` into `refs/heads/master`, and because it doesn't, the test case was marked as demonstrating a breakage. However, it would be improper to perform that conversion: the overall expectation of `fast-export` is that when piping it to `fast-import`, you get an identical result. And no matter how you hold the tool, `git fast-export main~2..main~1` will never be able to perform that trick because there is simply insufficient information. It would seem that `fast-export` Does The Right Thing here by using `main~1` as the "ref name", even if `fast-import` would stumble over that: At least the output documents properly which commit was exported, even if the result is not a valid `fast-import` script. So let's turn the test case around into documenting that the current behavior is actually expected and not at all a breakage that needs fixing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We do not write "GIT" in all caps anymore, and we do translate error messages. The error messages when a ref needs to be created and it fails either because the ref name is invalid or because the ref already exists should be identical to the ones `git branch` emits. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
3f59a18
to
d4008bc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Once upon a time, I worked on a remote-hg helper with Sverre Rabbelier. For really unfortunate reasons, our work was dismissed, and a now-dysfunct remote-hg helper was forced into git.git.
While I no longer have a need for a working remote-hg helper (and while I nowadays would be loathe to re-open that can of ugly worms, or for that matter, even to think back to that unhappy episode, and while I would probably use
git cinnabar
anyway), these patches still might have value to others.