[NEW] Adding Bazaar support: add misc, pull and push adapter modules with tests
[obnox/ohloh/ohloh_scm.git] / lib / scm / adapters / bzr / misc.rb
diff --git a/lib/scm/adapters/bzr/misc.rb b/lib/scm/adapters/bzr/misc.rb
new file mode 100644 (file)
index 0000000..fc2c694
--- /dev/null
@@ -0,0 +1,16 @@
+module Scm::Adapters
+       class BzrAdapter < AbstractAdapter
+               def exist?
+                       begin
+                               !!(head_token)
+                       rescue
+                               logger.debug { $! }
+                               false
+                       end
+               end
+
+               def ls_tree(token)
+                       run("cd #{path} && bzr ls -V -r #{token}").split("\n")
+               end
+       end
+end