[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version f
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git |
Date: |
Fri, 6 Apr 2018 01:27:13 +0200 |
On Thu, 5 Apr 2018 22:19:02 +0000 Greg Chicares <address@hidden> wrote:
GC> Let me put the question this way. There must be plenty of projects on
GC> plenty of servers that use git submodules.
Undoubtedly.
GC> At least some of them must be mirrored on other servers.
Probably.
GC> How do they do that?
I don't know, but I suspect that they either don't bother with getting
submodules from local mirrors or, for those who do, change the URL in the
main repository super-repository once manually.
GC> Or is it actually not feasible?
It's certainly feasible, but it's not built-in. Again, I can't really
blame Git for not supporting this because in general there is just no way
to know the local URL corresponding to the submodule URL. I.e. suppose that
you have a local mirror ~/mirrors/github/foo of the repository Foo at
GitHub which uses a submodule Bar hosted at SourceForge. When cloning the
local mirror of Foo, Git simply can't know that you also have a local
mirror of Bar in ~/mirror/sourceforge/bar.
GC> What I have in mind is possibly simpler, because we'll never push to
GC> it: just a read-only local mirror that can easily be kept synchronized
GC> with upstream, as a drop-in replacement for the github remote URL.
Yes, I understand. Keeping mirror up to date is simple enough, this is
basically what install_wx.sh currently does in its beginning, i.e. you just
want to "fetch" and then "submodule update" periodically. The only problem
is that this mirror can't be a bare repository, as is typical for mirrors,
it must have a working directory in order to have submodules.
Alternatively, you could also have N+1 bare repositories where N is the
number of submodules and +1 is for the main wxWidgets super-repository.
Then updating them would involve only running "git fetch" for each of them
in a loop, which is probably even simpler.
And if you set up things like this, i.e. using bare repositories (which
are, by convention, named with a .git suffix, i.e. you'd have wx.git,
zlib.git, png.git, ...), then it would be simple enough to use URLs based
on the main repository URL for submodules using relative paths as I wrote,
i.e. use $wx_git_url/../$submodule.git for them. Should we do it like this?
GC> This query:
GC> https://www.google.com/search?q=mirroring+git+repository+with+submodules
GC> found a few things like
GC> https://stackoverflow.com/questions/19301188/
GC> but I can't judge whether that makes sense. Then there's this:
GC>
https://sfxpt.wordpress.com/2013/02/17/git-mirroring-from-sourceforge-to-github/
GC> which surveys many approaches but seems to endorse none.
I did search the web too and while I didn't find the latter result
somehow, it doesn't really help as it doesn't speak about submodules at
all. And unfortunately I didn't find anything else that would help neither.
Please let me know if using relative paths for the submodules would be a
good enough solution for your needs,
VZ
- [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Vadim Zeitlin, 2018/04/01
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Greg Chicares, 2018/04/05
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Vadim Zeitlin, 2018/04/05
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Greg Chicares, 2018/04/05
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git,
Vadim Zeitlin <=
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Greg Chicares, 2018/04/06
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Vadim Zeitlin, 2018/04/06
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Vadim Zeitlin, 2018/04/06
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Greg Chicares, 2018/04/07
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Vadim Zeitlin, 2018/04/07
- [lmi] I will never understand 'test -n' [Was: Add script allowing to install any wxWidgets version from Git], Greg Chicares, 2018/04/07
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Greg Chicares, 2018/04/07
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Greg Chicares, 2018/04/08
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Greg Chicares, 2018/04/08
- Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git, Vadim Zeitlin, 2018/04/08