]> arthur.barton.de Git - bup.git/commitdiff
Merge branch 'master' into meta
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 31 May 2011 04:31:50 +0000 (00:31 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 31 May 2011 04:31:50 +0000 (00:31 -0400)
* master:
  Improve formatting of error and warning messages.

cmd/tag-cmd.py
lib/bup/drecurse.py
lib/bup/git.py
lib/bup/index.py

index bedd97c3504e5d9561cfa08e3f8ca8a7bb027ea8..17037b319b7c066f3ea15eec4411cbaa0ddeb1a3 100755 (executable)
@@ -29,7 +29,7 @@ if opt.delete:
     tag_file = git.repo('refs/tags/%s' % opt.delete)
     debug1("tag file: %s\n" % tag_file)
     if not os.path.exists(tag_file):
-        log("bup: error: tag '%s' not found." % opt.delete)
+        log("bup: error: tag '%s' not found.\n" % opt.delete)
         sys.exit(1)
 
     try:
@@ -55,7 +55,7 @@ if not tag_name:
 debug1("args: tag name = %s; commit = %s\n" % (tag_name, commit))
 
 if tag_name in tags:
-    log("bup: error: tag '%s' already exists" % tag_name)
+    log("bup: error: tag '%s' already exists\n" % tag_name)
     sys.exit(1)
 
 if tag_name.startswith('.'):
@@ -68,12 +68,12 @@ except git.GitError, e:
     sys.exit(2)
 
 if not hash:
-    log("bup: error: commit %s not found." % commit)
+    log("bup: error: commit %s not found.\n" % commit)
     sys.exit(2)
 
 pL = git.PackIdxList(git.repo('objects/pack'))
 if not pL.exists(hash):
-    log("bup: error: commit %s not found." % commit)
+    log("bup: error: commit %s not found.\n" % commit)
     sys.exit(2)
 
 tag_file = git.repo('refs/tags/%s' % tag_name)
index e0855c83197a241d50e79988ae0f5497d0cf68ad..866045ff680a313373d9e67d16a1756876412156 100644 (file)
@@ -132,7 +132,7 @@ def parse_excludes(flags):
                     for exclude_path in f.readlines():
                         excluded_paths.append(realpath(exclude_path.strip()))
                 except Error, e:
-                    log("warning: couldn't read %s" % parameter)
+                    log("warning: couldn't read %s\n" % parameter)
             finally:
                 f.close()
 
index 5edfe1c3185d6a143902aac79a2726520b1afc8f..5cb282922c392169dffc6bb9083ae441be606256 100644 (file)
@@ -821,7 +821,7 @@ def init_repo(path=None):
     if parent and not os.path.exists(parent):
         raise GitError('parent directory "%s" does not exist\n' % parent)
     if os.path.exists(d) and not os.path.isdir(os.path.join(d, '.')):
-        raise GitError('"%d" exists but is not a directory\n' % d)
+        raise GitError('"%s" exists but is not a directory\n' % d)
     p = subprocess.Popen(['git', '--bare', 'init'], stdout=sys.stderr,
                          preexec_fn = _gitenv)
     _git_wait('git init', p)
@@ -961,7 +961,7 @@ class CatPipe:
         assert(self.p)
         assert(self.p.poll() == None)
         if self.inprogress:
-            log('_fast_get: opening %r while %r is open'
+            log('_fast_get: opening %r while %r is open\n'
                 % (id, self.inprogress))
         assert(not self.inprogress)
         assert(id.find('\n') < 0)
index 3fde0f968a0d8d4f052ce9c94eec1f3da569738c..4efc03be1dea32bc29b4cd378ac0460d0ef6cae0 100644 (file)
@@ -275,7 +275,7 @@ class Reader:
         if f:
             b = f.read(len(INDEX_HDR))
             if b != INDEX_HDR:
-                log('warning: %s: header: expected %r, got %r'
+                log('warning: %s: header: expected %r, got %r\n'
                                  % (filename, INDEX_HDR, b))
             else:
                 st = os.fstat(f.fileno())