mbox

[pull,request] Pull request for branch yem/pwclient

Message ID cover.1403983801.git.yann.morin.1998@free.fr
State Superseded
Headers show

Pull-request

git://ymorin.is-a-geek.org/patchwork yem/pwclient

Message

Yann E. MORIN June 28, 2014, 7:32 p.m. UTC
From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Hello All!

As I previosuly explained [0], it is not really convenient to use pwclient
when dealing with different projects hosted on different servers.

Here is an attempt to change the format of pwclientrc so it is easier to
manage such scatered-around projects.

Comments most welcome!

Regards,
Yann E. MORIN.


The following changes since commit a51649320771b8abe7259c0812874c15cab0da18:

  urls: Fix django-1.6 change in password change views (2014-05-07 09:27:41 +0800)

are available in the git repository at:

  git://ymorin.is-a-geek.org/patchwork yem/pwclient

for you to fetch changes up to b53b822df5efcc529a695edbea0b3fd3863757be:

  pwclient: add bash completion for project names (2014-06-28 21:16:56 +0200)

----------------------------------------------------------------
Yann E. MORIN (2):
      pwclient: accept more than one project in ~/.pwclientrc
      pwclient: add bash completion for project names

 apps/patchwork/bin/bash_completion | 29 +++++++++++++++++++++++++
 apps/patchwork/bin/pwclient        | 44 ++++++++++++++++++++++++++------------
 templates/patchwork/pwclientrc     | 16 +++++++-------
 3 files changed, 67 insertions(+), 22 deletions(-)
 create mode 100644 apps/patchwork/bin/bash_completion

Comments

Jeremy Kerr June 30, 2014, 2:56 a.m. UTC | #1
Hi Yann,

> As I previosuly explained [0], it is not really convenient to use pwclient
> when dealing with different projects hosted on different servers.
> 
> Here is an attempt to change the format of pwclientrc so it is easier to
> manage such scatered-around projects.

Oh awesome, I've always wanted to do this. My only concern is
compatibility with older config files. How difficult would it be to
automatically migrate?

Cheers,


Jeremy
Yann E. MORIN June 30, 2014, 4:02 p.m. UTC | #2
Jeremy, All,

On 2014-06-30 10:56 +0800, Jeremy Kerr spake thusly:
> > As I previosuly explained [0], it is not really convenient to use pwclient
> > when dealing with different projects hosted on different servers.
> > 
> > Here is an attempt to change the format of pwclientrc so it is easier to
> > manage such scatered-around projects.
> 
> Oh awesome, I've always wanted to do this. My only concern is
> compatibility with older config files. How difficult would it be to
> automatically migrate?

We can either offer a migration plan, or continue supporting the old
format.

Needless to say, supporting the old format would make the code ugly.

As for the migration, there are three possibilities:
 1) migrate transparently on first call;
 2) error-out on old format, instructing to run with the --migrate
    option;
 3) error-out on old format, instruct to run another program to do the
    migration.

But the migration might not be that easy: some people (like me) may have
commented sections in their current .pwclientrc, so it is easier to
switch projects.

So, that's why I just decided to error-out on the old format, rather
than either migrate or support the legacy format.

Of course, the new .pwclientrc downloaded from the project's page should
be changed to include instructions on how to migrate, if needed.

The path of least surprise to the user is to support the old format, but
risks making the code a bit more complex...

What do you prefer?

Regards,
Yann E. MORIN.
Jeremy Kerr July 1, 2014, 1:13 a.m. UTC | #3
Hi Yann,

> We can either offer a migration plan, or continue supporting the old
> format.
> 
> Needless to say, supporting the old format would make the code ugly.

I agree, I don't think we want to transparently support the old format,
for exactly that reason.

> As for the migration, there are three possibilities:
>  1) migrate transparently on first call;
>  2) error-out on old format, instructing to run with the --migrate
>     option;
>  3) error-out on old format, instruct to run another program to do the
>     migration.
> 
> But the migration might not be that easy: some people (like me) may have
> commented sections in their current .pwclientrc, so it is easier to
> switch projects.
> 
> So, that's why I just decided to error-out on the old format, rather
> than either migrate or support the legacy format.
> 
> Of course, the new .pwclientrc downloaded from the project's page should
> be changed to include instructions on how to migrate, if needed.

If it's feasible to upgrade the .pwclientrc (while saving a backup),
then that would be nice. Otherwise, let's error out, and print a URL to
a little guide (under /help/) to manually migrate.

Cheers,


Jeremy
Yann E. MORIN July 1, 2014, 4:19 p.m. UTC | #4
Jeremy, All,

On 2014-07-01 09:13 +0800, Jeremy Kerr spake thusly:
> > As for the migration, there are three possibilities:
> >  1) migrate transparently on first call;
> >  2) error-out on old format, instructing to run with the --migrate
> >     option;
> >  3) error-out on old format, instruct to run another program to do the
> >     migration.
> > 
> > But the migration might not be that easy: some people (like me) may have
> > commented sections in their current .pwclientrc, so it is easier to
> > switch projects.
> > 
> > So, that's why I just decided to error-out on the old format, rather
> > than either migrate or support the legacy format.
> > 
> > Of course, the new .pwclientrc downloaded from the project's page should
> > be changed to include instructions on how to migrate, if needed.
> 
> If it's feasible to upgrade the .pwclientrc (while saving a backup),
> then that would be nice. Otherwise, let's error out, and print a URL to
> a little guide (under /help/) to manually migrate.

OK, I'll see what I can come up with...

Regards,
Yann E. MORIN.