[Dune] [#981] git support for dunecontrol
Dune
flyspray at dune-project.org
Thu Nov 24 17:54:55 CET 2011
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#981 - git support for dunecontrol
User who did this - Sven Marnach (sven)
----------
@Andreas: Writing your own script to do "dunecontrol update" is much more complex than just writing a hook. You would have to replicate the whole module detection functionality of dunecontrol. ("dunecontrol print" doesn't help you -- it only prints the module names, and there doesn't seem to be a way to deduce paths from module names.)
I still think the hook is the easiest and most general solution. It would allow to easily exclude modules from "dunecontrol update" ("touch update-hook", or however the hook would be called). Simply copying the example git update hook from dune-common would enable the proposed git support. We wouldn't need the git config option suggested by Jö.
Alas, I don't actually care much about the feature either. I do use "dunecontrol update" and I want it to update my svn repositories and not to break anything else.
Regarding the proposed patch: It seems to be quite careful about whether to call git at all, yet it would break at least one of my repositories. This repository has both, svn and git remotes, with the remote git repository being the "main" repository. If this repository is up to date with the git remote repository, the proposed patch would try to rebase the svn remote on top of it, which is clearly undesirable. If this patch gets applied, I'd like some option to disable it.
Another problem with the patch is that it tries to parse refs itself, bypassing the API to access them. This fails in multiple ways; most notably it completely ignores packed-refs.
I would go for a much simpler approach: Always call "git fetch", silencing any errors. If .git/svn exists, also call "git svn fetch", again silencing errors. These commands only update the remote tracking branches, no risk of breaking anything here. Finally, call "git merge --ff-only". This will merge only if it is a fast forward, and will work for both, native git and git-svn, since in the case of a fast forward, a rebase and a merge are the same. It also implicitly checks for local changes, eliminating any sophisticated tests.
----------
More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=981#comment2922
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
More information about the Dune
mailing list