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

sforceimports does not fetch from the repository specified in the suite #78

Closed
zapster opened this issue Mar 11, 2016 · 6 comments
Closed
Assignees

Comments

@zapster
Copy link
Member

zapster commented Mar 11, 2016

mx sforceimport does not use the location specified in the suites to fetch new revisions but the default remote of the clone. This is for example a problem if one uses a fork as default but the fork does not contain the revision that is requested.

# clone graal-core
git clone --depth 1 https://github.com/graalvm/graal-core
# clone an old version of truffle from an outdated fork
git clone --depth 1 https://github.com/zapster/truffle-outdated truffle
# sforceimport graal-core
cd graal-core
mx -y sforceimports

results in:

fatal: reference is not a tree: f322868c76f775a399bf96915c95e077c4f2c08c

I think we should per default fetch from the repository specified in the suite and add a flag to disable the behavior for scenarios where we never want to use local mirrors.

@zapster
Copy link
Member Author

zapster commented Mar 11, 2016

/cc @gilles-duboscq

@tkrodriguez
Copy link
Member

I'd say it should check that the repo has a remote which is the same as the one specified in the suite and complain. It could maybe offer to add the remote or tell you how to do it. We also seem to be assuming that after a fetch the changeset we are looking for will be there. Maybe we should rerun the exists query after the fetch to ensure we really got the result we expected.

@dougxc dougxc assigned zapster and unassigned dougxc Mar 11, 2016
@dougxc
Copy link
Member

dougxc commented Mar 11, 2016

@zapster, I think it would be best if someone who uses sforceimport takes on this issue.

@tkrodriguez
Copy link
Member

Well I do think that GitConfig.pull should complain if the pull doesn't produce the rev being requested. hg doesn't have this problem but git simply ignores the rev because you can't really pull a particular rev with git. That's the source of the fatal messages because we later assume the rev is there but it's not.

If you don't use sforceimport what do you use? Manually getting revs from the suite.py?

@dougxc
Copy link
Member

dougxc commented Mar 11, 2016

Yes.

@zapster
Copy link
Member Author

zapster commented Mar 14, 2016

#81 is already a great improvement, thanks @tkrodriguez. I'd still like a flag that uses the specified upstream repo (maybe --upstream?). I will look into it.

@zapster zapster added enhancement and removed bug labels Mar 14, 2016
dougxc pushed a commit that referenced this issue May 12, 2016
* commit '5f47c88ee79ab39f4645e6ce717a0c81e22377f5':
  Re-add quiet flag to hg_command and git_command.
@zapster zapster closed this as completed Oct 16, 2023
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

3 participants