1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-09 22:36:14 +01:00

suggest git, svn, ... if indicated, after oscerr.NoWorkingCopy

This commit is contained in:
Juergen Weigert 2010-03-08 01:52:13 +01:00
parent f9855a821b
commit 4bd3d515ee
2 changed files with 10 additions and 1 deletions

1
NEWS
View File

@ -1,3 +1,4 @@
- suggest git, svn, ... if indicated, after oscerr.NoWorkingCopy
- "osc cat" now auto-expands through link.
- fixed "osc add" after "osc delete".

View File

@ -3,6 +3,7 @@
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or (at your option) any later version.
import os.path
import sys
import signal
from osc import oscerr
@ -84,8 +85,15 @@ def run(prg):
print >>sys.stderr, 'Use "osc repairlink" to fix merge conflicts.\n'
return 1
except (oscerr.NoWorkingCopy, oscerr.WorkingCopyWrongVersion), e:
except oscerr.WorkingCopyWrongVersion, e:
print >>sys.stderr, e
except oscerr.NoWorkingCopy, e:
print >>sys.stderr, e
if os.path.isdir('.git'): print >>sys.stderr, "Current directory looks like git."
if os.path.isdir('.hg'): print >>sys.stderr, "Current directory looks like mercurial."
if os.path.isdir('.svn'): print >>sys.stderr, "Current directory looks like svn."
if os.path.isdir('CVS'): print >>sys.stderr, "Current directory looks like cvs."
return 1
except HTTPError, e: