Re: [RFC/PATCH] git-remote-mediawiki: reset private ref after non-dumb push
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Aug 22, 2013, 17:20 UTC
- Message-ID
- <CAMP44s3jh4iEbgONaEU0WSCc5YiGYoK8edcgWU6qmUARToVRuw@mail.gmail.com>
- In-Reply-To
- <vpqa9ka7mku.fsf@anie.imag.fr>
On Wed, Aug 21, 2013 at 4:36 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 12 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > >> On Tue, Aug 13, 2013 at 8:31 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote: >> >>> Felipe: Is this the right fix for git-remote-mediawiki? Any better idea? >> >> Why not keep track of the revisions yourself? You can have file where >> you store which was the last revision that was fetched. > > I don't really understand the point of the "private namespace" anymore I > guess. Why do we have both refs/remotes/$remote and > refs/$foreign_vcs/$remote, if they are always kept in sync?
They are not always in sync; if a push fails, the private namespace is not updated.
> Keeping the last imported revision in a separate file would be possible, > but then we'd have information about the remote in one file plus two > refs, and I don't understand why we need to split the information in so > many places. A ref seemed the right tool to store a revision.
As I said, they are not exactly the same. It is possible refs/remotes point to a mercurial revision on the remote server, and refs/hg points to a mercurial revision on the local internal repository, and they are not the same.
-- Felipe Contreras