Bug#584483: osc: Please use sensible-utils

2010-06-09 Thread Fathi Boudra
Hi,

detect current distributions with lsb_release -is, then provide sane
default values to well known distributions ?

Cheers,

Fathi



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#584483: osc: Please use sensible-utils

2010-06-09 Thread Michal Čihař
Dne Fri, 04 Jun 2010 19:33:19 +0300
Teemu Hukkanen tjhuk...@iki.fi napsal(a):

 Michal Čihař ni...@debian.org writes:
 
  Dne Thu, 03 Jun 2010 23:18:58 +0300
  Teemu Hukkanen tjhuk...@iki.fi napsal(a):
  Please use sensible-utils instead of hardcoding fallbacks when EDITOR
  and PAGER are not defined.
 
  Thanks, do you know some easy way to detect that it is running on
  Debian so that the patch can be merged upstream?
 
 Upstream needs a different patch (fall back to vi, not vim for editor,
 and maybe more instead of less for pager). I don't think osc should try
 to detect what sort of system it is running on, just keep the patch with
 the debian packaging.

Implemented upstream using platform module, will be part of next
release.

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Bug#584483: osc: Please use sensible-utils

2010-06-08 Thread Michal Čihař
Hi

Dne Fri, 04 Jun 2010 19:33:19 +0300
Teemu Hukkanen tjhuk...@iki.fi napsal(a):

 Michal Čihař ni...@debian.org writes:
 
  Dne Thu, 03 Jun 2010 23:18:58 +0300
  Teemu Hukkanen tjhuk...@iki.fi napsal(a):
  Please use sensible-utils instead of hardcoding fallbacks when EDITOR
  and PAGER are not defined.
 
  Thanks, do you know some easy way to detect that it is running on
  Debian so that the patch can be merged upstream?
 
 Upstream needs a different patch (fall back to vi, not vim for editor,
 and maybe more instead of less for pager). I don't think osc should try
 to detect what sort of system it is running on, just keep the patch with
 the debian packaging.

Well I'd rather avoid having a patch in a package, especially when I
have commit rights in the upstream :-).

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Bug#584483: osc: Please use sensible-utils

2010-06-04 Thread Michal Čihař
Hi

Dne Thu, 03 Jun 2010 23:18:58 +0300
Teemu Hukkanen tjhuk...@iki.fi napsal(a):

 Package: osc
 Severity: normal
 Version: 0.126-2
 Tags: patch
 
 Please use sensible-utils instead of hardcoding fallbacks when EDITOR
 and PAGER are not defined.
 Patch included.

Thanks, do you know some easy way to detect that it is running on
Debian so that the patch can be merged upstream?

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Bug#584483: osc: Please use sensible-utils

2010-06-04 Thread Teemu Hukkanen
Michal Čihař ni...@debian.org writes:

 Dne Thu, 03 Jun 2010 23:18:58 +0300
 Teemu Hukkanen tjhuk...@iki.fi napsal(a):
 Please use sensible-utils instead of hardcoding fallbacks when EDITOR
 and PAGER are not defined.

 Thanks, do you know some easy way to detect that it is running on
 Debian so that the patch can be merged upstream?

Upstream needs a different patch (fall back to vi, not vim for editor,
and maybe more instead of less for pager). I don't think osc should try
to detect what sort of system it is running on, just keep the patch with
the debian packaging.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#584483: osc: Please use sensible-utils

2010-06-03 Thread Teemu Hukkanen
Package: osc
Severity: normal
Version: 0.126-2
Tags: patch

Please use sensible-utils instead of hardcoding fallbacks when EDITOR
and PAGER are not defined.
Patch included.

--- osc/core.py.orig	2010-06-03 09:56:03.904960814 +0300
+++ osc/core.py	2010-06-03 09:49:42.851959319 +0300
@@ -1400,7 +1400,7 @@
 mtime_orig = os.stat(filename).st_mtime
 
 if sys.platform[:3] != 'win':
-editor = os.getenv('EDITOR', default='vim')
+editor = os.getenv('EDITOR', default='editor')
 else:
 editor = os.getenv('EDITOR', default='notepad')
 while 1:
@@ -2209,7 +2209,7 @@
 
 def edit(self):
 if sys.platform[:3] != 'win':
-editor = os.getenv('EDITOR', default='vim')
+editor = os.getenv('EDITOR', default='editor')
 else:
 editor = os.getenv('EDITOR', default='notepad')
 try:
@@ -2444,7 +2444,7 @@
 f.close()
 
 if sys.platform[:3] != 'win':
-editor = os.getenv('EDITOR', default='vim')
+editor = os.getenv('EDITOR', default='editor')
 else:
 editor = os.getenv('EDITOR', default='notepad')
 try:
@@ -4643,7 +4643,7 @@
 tmpfile.write(server_diff(apiurl, request.actions[0].dst_project, request.actions[0].dst_package, None,
   request.actions[0].src_project, request.actions[0].src_package, request.actions[0].src_rev, True, True))
 tmpfile.flush()
-pager = os.getenv('EDITOR', default='less')
+pager = os.getenv('EDITOR', default='pager')
 subprocess.call('%s %s' % (pager, tmpfile.name), shell=True)
 elif repl == 'c':
 print sys.stderr, 'Aborting'

Thanks.