]> arthur.barton.de Git - bup.git/commitdiff
ls: add missing sys and columnate imports
authorRob Browning <rlb@defaultvalue.org>
Sun, 17 Jan 2016 19:20:49 +0000 (13:20 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 17 Jan 2016 19:22:23 +0000 (13:22 -0600)
This was ignored by the existing tests because there was no tty.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/ls.py
t/test-ls.sh

index 6e66be5e838bc7281787604cdd0f5f87f6482d19..b52b188f1ec4d66067d17c6b2b4ff6b67aa26de8 100644 (file)
@@ -1,9 +1,9 @@
 """Common code for listing files from a bup repository."""
 
-import copy, os.path, stat, xstat
+import copy, os.path, stat, sys, xstat
 
 from bup import metadata, options, vfs
-from helpers import istty1, log
+from helpers import columnate, istty1, log
 
 
 def node_info(n, name,
index b5b750b3846684a307b8105f50268aaea64785c1..5d8fda86b4c8face2b6248d38d3c943e0a89684e 100755 (executable)
@@ -35,6 +35,8 @@ WVPASS bup tag some-tag src
 
 WVSTART "ls (short)"
 
+(export BUP_FORCE_TTY=1; WVPASSEQ "$(WVPASS bup ls | tr -d ' ')" src)
+
 WVPASSEQ "$(WVPASS bup ls /)" "src"
 
 WVPASSEQ "$(WVPASS bup ls -A /)" ".commit