+ let args: Vec<String> = env::args().collect();
+ let mut opts = Options::new();
+ opts.optopt("r", "repo", "repository path", "PATH");
+ let matches = opts.parse(&args[1..]).unwrap();
+ let repo = matches.opt_str("r").unwrap_or(".".to_string());
+ let repo_path = Path::new(&repo);
+ let pristine_path = repo_path.join(".pijul/pristine/db");
+
+ let pristine = Pristine::new(pristine_path).unwrap();
+ let txn = pristine.txn_begin().unwrap();
+ let channel_name = txn.current_channel().unwrap();
+ println!("On channel {}", channel_name);
+ let channel = txn.load_channel(channel_name).unwrap().unwrap();
+
+ let rev_log = txn.reverse_log(&*channel.read(), None).unwrap();
+ for pr in rev_log {
+ let (_, (h, _)) = pr.unwrap();
+ println!("{:?}", h);
+ }