Bug 26128 - mgarepo editlog doesn't appear in --help output
Summary: mgarepo editlog doesn't appear in --help output
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2020-01-24 10:50 CET by papoteur
Modified: 2020-02-04 12:08 CET (History)
6 users (show)

See Also:
Source RPM: mgarepo-1.14.1-1.mga7.src.rpm
CVE:
Status comment:


Attachments
Unusable nano instance when using mgarepo editlog (28.45 KB, image/png)
2020-01-25 12:52 CET, Rémi Verschelde
Details

Description papoteur 2020-01-24 10:50:37 CET
From Akien:
We could maybe add an alias in mgarepo, e.g. `mgarepo logedit rXXX`.

$ cat /usr/local/bin/propedit
#!/bin/sh
svn propedit --revprop svn:log -r $@

Question:
Which parameters have to be recognized?
papoteur 2020-01-24 10:51:24 CET

CC: (none) => rverschelde

Comment 1 Jani Välimaa 2020-01-24 15:56:25 CET
Only parameter needed is the revision number.

$ cat .bin/propedit 
#!/bin/bash

if [[ $# -ne 1 ]]; then
  echo "Usage: $(basename $0) [revision]"
else
  EDITOR=${EDITOR:-nano} svn propedit --revprop -r $1 svn:log svn+ssh://svn.mageia.org/svn/packages
fi

CC: (none) => jani.valimaa

Comment 2 Jani Välimaa 2020-01-24 16:03:40 CET
In my updated script I'm using nano as a default EDITOR if it's not defined to something else. The default can be what ever is decided, but anyway I think it would be nice to use EDITOR that one has set.
Comment 3 Jani Välimaa 2020-01-24 16:08:47 CET
(In reply to Jani Välimaa from comment #2)
> In my updated script I'm using nano as a default EDITOR if it's not defined
> to something else. The default can be what ever is decided, but anyway I
> think it would be nice to use EDITOR that one has set.

Forget this one, svn uses EDITOR env variable anyway if it's exported.
Comment 4 papoteur 2020-01-25 11:38:39 CET
What about the already existing command "editlog"? :

Usage: mgarepo editlog [OPTIONS] [URL] REVISION

Options:
    -h         Show this message

Examples:
    mgarepo editlog 14800
    mgarepo editlog https://repos/svn/cnc/snapshot 14800
Comment 5 Rémi Verschelde 2020-01-25 12:52:43 CET
Created attachment 11482 [details]
Unusable nano instance when using mgarepo editlog

Ah indeed, I had never noticed this option :O

It's not listed in `mgarepo --help`.

Moreover, it seems to work but the way it opens `EDITOR` seems broken. My `EDITOR` is `nano`, and it does open it, but I can't interact with it normally. See attached screenshot (I tried to quit with Ctrl+X, and move to the right with the arrow key, which added these `^X^[OC`. I have to kill the session to exit nano).

I'll rename the issue to cater to the newly found issues.
Rémi Verschelde 2020-01-25 12:53:09 CET

Summary: add an alias in mgarepo for logedit => mgarepo editlog doesn't appear in --help output, incorrectly opens defined EDITOR

Comment 6 David GEIGER 2020-01-25 13:24:59 CET
Here it works fine opening kwrite and do a test:


$ mgarepo log opencv
r1482863 | daviddavid | 2020-01-25 13:17:33 +0100 (sam. 25 janv. 2020) | 3 lignes

SILENT: fix for: "error: Not a directory"
SILENT: test for mgarepo editlog
$

CC: (none) => geiger.david68210

Comment 7 Jani Välimaa 2020-01-25 15:18:21 CET
(In reply to Rémi Verschelde from comment #5)
> Created attachment 11482 [details]
> Unusable nano instance when using mgarepo editlog
> 
> Ah indeed, I had never noticed this option :O
> 
> It's not listed in `mgarepo --help`.
> 
> Moreover, it seems to work but the way it opens `EDITOR` seems broken. My
> `EDITOR` is `nano`, and it does open it, but I can't interact with it
> normally. See attached screenshot (I tried to quit with Ctrl+X, and move to
> the right with the arrow key, which added these `^X^[OC`. I have to kill the
> session to exit nano).
> 

mgarepo editlog works fine for me with EDITOR=nano/vim/mousepad. Perhaps issues with terminal emulator? What's the output of 'echo $TERM'?
Comment 8 Rémi Verschelde 2020-01-25 18:23:21 CET
(In reply to Jani Välimaa from comment #7)
> mgarepo editlog works fine for me with EDITOR=nano/vim/mousepad. Perhaps
> issues with terminal emulator? What's the output of 'echo $TERM'?

Might be specific to my terminal yeah. I use yakuake on KDE, `$TERM` is `xterm-256color`.
Comment 9 papoteur 2020-01-27 18:31:15 CET
Hello,
I pushed an update to add the command editlog in man page and help.
Do you think it has to be released now?
Comment 10 David GEIGER 2020-01-27 23:22:36 CET
Should be fixed in Cauldron with new release 1.14.2!
Comment 11 Rémi Verschelde 2020-01-28 08:10:34 CET
I removed the part about `nano` quirks in yakuake as it seems specific to my setup. I'll open a new bug report about it.

Summary: mgarepo editlog doesn't appear in --help output, incorrectly opens defined EDITOR => mgarepo editlog doesn't appear in --help output

Comment 12 Rémi Verschelde 2020-01-28 08:10:49 CET
Fixed with version 1.14.2.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 13 David GEIGER 2020-01-28 11:29:00 CET
I think we can update it for mga7 too, WDYT?
Comment 14 David GEIGER 2020-02-03 10:12:39 CET
Assigning to QA,

Advisory:
=============================

This new update adds command editlog in help, man page and bash completion.

=============================


Packages in 7/core/updates_testing:
========================
mgarepo-1.14.2-1.mga7.noarch.rpm
mgarepo-ldap-1.14.2-1.mga7.noarch.rpm

Source RPM: 
========================
mgarepo-1.14.2-1.mga7.src.rpm

Source RPM: mgarepo => mgarepo-1.14.1-1.mga7.src.rpm
Version: Cauldron => 7
Assignee: mageiatools => qa-bugs
Resolution: FIXED => (none)
Status: RESOLVED => REOPENED

Comment 15 David GEIGER 2020-02-03 10:17:19 CET
As i use mgarepo everyday I can confirm that this new update added properly the command editlog in help, man page and bash completion on my mga7 for x86_64 system.

Whiteboard: (none) => MGA7-64-OK

Comment 16 Thomas Andrews 2020-02-03 22:34:48 CET
That simplifies things, David. Thanks.

Validating. Advisory in Comment 14.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Thomas Backlund 2020-02-04 11:24:32 CET

CC: (none) => tmb
Keywords: (none) => advisory

Comment 17 Mageia Robot 2020-02-04 12:08:21 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2020-0041.html

Resolution: (none) => FIXED
Status: REOPENED => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.