AAXP2534BWX2ZUDZZHUMLYDBMGFGUH32CNRA3KOLER3JKOIJUZLAC
QL6K2ZM35B3NIXEMMCJWUSFXOBQHAGXRDMO7ID5DCKTJH4QJVY7QC
VU4KVXHWMLZCJJDO3DDUTNTYUDCDD7RSJ3QJ67EMNZV44H2YIKSAC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
GHO6DWPILBBTL6CVZKERJBTFL3EY6ZT4YM4E5R4S6YPGVFKFHCVAC
CCLLB7OIFNFYJZTG3UCI7536TOCWSCSXR67VELSB466R24WLJSDAC
3AMEP2Y5J6GA4AWQONF4JVA3XSR3ASLHHKMYG44R72SOUY3UQCDAC
HSVGP2G4D2F56DS3YKZLSYPS4A5BNGH4NTAXAOZ57OCXFM3E5AYAC
I24UEJQLCH2SOXA4UHIYWTRDCHSOPU7AFTRUOTX7HZIAV4AZKYEQC
None => {
let channel_name = repo
.config
.get_current_channel(None)
.0
.to_string();
let txn = repo.pristine.txn_begin()?;
let channel = if let Some(c) = txn.load_channel(&channel_name)? {
c
} else {
bail!("Channel {:?} not found", channel_name)
};
let mut tag_path = repo.path.join(libpijul::DOT_DIR);
tag_path.push("tags");
super::pager();
for t in txn.rev_iter_tags(txn.tags(&*channel.read()?), None)? {
let (_, h) = t?;
let h: libpijul::Hash = h.into();
libpijul::changestore::filesystem::push_filename(&mut tag_path, &h);
let mut f = libpijul::tag::OpenTagFile::open(&tag_path)?;
let header = f.header()?;
writeln!(stdout, "Tag {}", h.to_base32())?;
writeln!(stdout, "Author: {:?}", header.authors)?;
writeln!(stdout, "Date: {}", header.timestamp)?;
writeln!(stdout, "State: {}", f.state().to_base32())?;
writeln!(stdout, "\n {}\n", header.message)?;
}
}
fn iter_tags(
&self,
channel: &Self::Tags,
from: u64,
) -> Result<
super::Cursor<Self, &Self, Self::TagsCursor, L64, SerializedHash>,
TxnErr<Self::GraphError>,
> {
self.cursor_tags(channel, Some(from.into()))
}
fn rev_iter_tags(
&self,
channel: &Self::Tags,
from: Option<u64>,
) -> Result<
super::RevCursor<Self, &Self, Self::TagsCursor, L64, SerializedHash>,
TxnErr<Self::GraphError>,
> {
let mut cursor = btree::cursor::Cursor::new(&self.txn, channel)?;
if let Some(from) = from {
cursor.set(&self.txn, &from.into(), None)?;
} else {
cursor.set_last(&self.txn)?;
};
Ok(RevCursor {
cursor,
txn: self,
k: std::marker::PhantomData,
v: std::marker::PhantomData,
t: std::marker::PhantomData,
})
}
fn iter_tags(
&self,
channel: &Self::Tags,
from: u64,
) -> Result<
Cursor<Self, &Self, Self::TagsCursor, L64, SerializedHash>,
TxnErr<Self::GraphError>,
>;
fn rev_iter_tags(
&self,
channel: &Self::Tags,
from: Option<u64>,
) -> Result<
RevCursor<Self, &Self, Self::TagsCursor, L64, SerializedHash>,
TxnErr<Self::GraphError>,
>;