emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFE] Migration to gitlab


From: Clément Pit-Claudel
Subject: Re: [RFE] Migration to gitlab
Date: Fri, 10 May 2019 11:26:55 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 2019-05-10 11:00, 조성빈 wrote:
>> github.com/magit/forge

Forge is great, but we should evaluate it carefully before deciding that we 
want to depend on it.  Concretely, about a week ago, Eli wrote and asked how 
one could browse Gitlab issues from Emacs, e.g. the issue that Toon had created 
on the Gitlab repo about Emacs' needs.

I set out to write detailed instructions, but gave up halfway, because forge 
didn't work for that use case.  Indeed, the way forge deals with issues and 
merge requests is to download the full issue database of the project.  For 
Gitlab, with 27000 merge requests and 50000 issues, the software spent multiple 
of minutes attempting to download this humongous database, and then gave up and 
threw an exception.  Accordingly, I gave up and didn't post my instructions 
(Eli, they are below, if you are curious to try them on a smaller repository; 
forge is indeed great when it can handle the repo size).

I do not know whether Emacs' issue database is large enough to cause issues. 
Additionally, I understand that thigs may improve in the future, because forge 
currently uses an inefficient communication protocol to talk to Gitlab (but 
there are plans to support a better protocol in Gitlab, I think).  I do not 
know whether things will work better once Gitlab implements a better protocol 
(I hope they will!).  In the meantime, we should be careful about assuming that 
forge will solve the problem of browsing Gitlab issues from Emacs.

Below are the instructions I had started to write.

Clément.

On 2019-04-30 11:37, Eli Zaretskii wrote:
>> From: Dmitry Gutov <address@hidden>
>> Date: Tue, 30 Apr 2019 00:35:11 +0300
>> Cc: emacs-devel <address@hidden>
>>
>> Speaking of GitLab clients, here's one: 
>> https://github.com/nlamirault/emacs-gitlab
>>
>> I haven't tried it myself yet, but it seems to include commenting 
>> functionality (gitlab-notes.el).
>
> Does anyone know how to use that to browse some GitLab issue, e.g. the
> one posted by Toon?  I tried to do that, but got only error messages.
> I suspect that I didn't understand how to use the package.

I haven't tried this particular package, but here is how to do it using magit 
and forge:

* Gitlab authentication:
  * Browse to https://gitlab.com/profile/personal_access_tokens ; check the 
'api' box and give a name to the token (e.g. Emacs Forge) ; click 'Create 
personal access token'
  * Copy the resulting token into ~/.authinfo, on a new line like the following 
(make sure there is a final newline at the end of the file):
    machine gitlab.com/api/v4 login YOUR_GITLAB_USERNAME^forge password 
YOUR_TOKEN
  * Set your username: git config gitlab.user YOUR_GITLAB_USERNAME
  * Clone the gitlab-ce repository: git clone 
https://gitlab.com/gitlab-org/gitlab-ce.git/ --depth 1 SOMEWHERE_CONVENIENT
* Emacs setup:
  * Add MELPA to your package repositories: (add-to-list 'package-archives 
(cons "melpa" "https://melpa.org/packages/";) t)
  * M-x package-list-packages; install 'magit' and 'forge'
  * C-u M-x magit-status; type the directory (SOMEWHERE_CONVENIENT) in which 
you cloned the repository above
  * M-: (require 'forge); then press f y (This retrieves the full collection of 
merge requests and bug reports for that repository; it fails, because gitlab-ce 
has 50000 issues and 27000 merge requests).
  * Once this completes, you have access in the `magit' buffer to a list of 
issues and merge requests; you press RET on any of them to view the discussion.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]