OXYGENHUB

describe, amend, abandon, split, squash and rebase read only the metadata they print (refs #41) 631fc8970bd0

Each printed the new change's id and subject after reading the whole
change, its texts included: seconds for a change that adds a large
tree.
Author
Andy McCall @andymccall <[email protected]>
When
· 2026-10-02 03:36 UTC
Signature
✔ signed by Andy McCall
Hash
631fc8970bd0c661d21514be9ee52785edec89d9ad5b4704974e3ccbafc57626
Depends on
23b217d75848 614541c3cebd 6706bdcfb63e 728da0f92161 75167672ebcd e266b7d4065c fce44ae9ad29
Depended on by
2c9ddac3c387
In bookmarks
agents-in-readme bare-hashes carried-not-removed carry-identical doctor-trust identical-sides keyless-tags main merge-remote-bookmark only-help-103 paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state switch-says
In tags
v0.10.0 v0.11.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.4.3 v0.4.4 v0.4.5 v0.4.6 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
Edits
14 atoms, 0 tree operations, 1 file

Browse the tree at this change

modified src/cli/workspace.rs +14 −14
…
1290 unchanged lines
1291 1291
        None => current_head(&repo)?,
1292 1292
    };
1293 1293
    let new = repo.describe(&h, message)?;
1294 -
    let c = repo.store().get_change(&new)?;
1294 +
    let c = repo.store().get_change_meta(&new)?;
1295 1295
    println!(
1296 1296
        "{} {} {}  {}",
1297 1297
        ui::done("Described"),
1298 -
        ui::id(short_id(&c)),
1298 +
        ui::id(c.change_id.short(8)),
1299 1299
        ui::hash(format!("#{}", new.short(12))),
1300 1300
        ui::subject(subject_of(message))
1301 1301
    );
…
9 unchanged lines
1311 1311
        }
1312 1312
        None => repo.amend(message)?,
1313 1313
    };
1314 -
    let c = repo.store().get_change(&new)?;
1314 +
    let c = repo.store().get_change_meta(&new)?;
1315 1315
    println!(
1316 1316
        "{} {} {}  {}",
1317 1317
        ui::done("Amended"),
1318 -
        ui::id(short_id(&c)),
1318 +
        ui::id(c.change_id.short(8)),
1319 1319
        ui::hash(format!("#{}", new.short(12))),
1320 1320
        ui::subject(subject_of(&c.message))
1321 1321
    );
…
3 unchanged lines
1325 1325
pub fn abandon(change: &str) -> Result<i32> {
1326 1326
    let repo = open()?;
1327 1327
    let h = repo.resolve_change(change)?;
1328 -
    let c = repo.store().get_change(&h)?;
1328 +
    let c = repo.store().get_change_meta(&h)?;
1329 1329
    let notes = repo.abandon(&h)?;
1330 1330
    println!(
1331 1331
        "{} {} {}  {}",
1332 1332
        ui::done("Abandoned"),
1333 -
        ui::id(short_id(&c)),
1333 +
        ui::id(c.change_id.short(8)),
1334 1334
        ui::hash(format!("#{}", h.short(12))),
1335 1335
        ui::dim("its content remains on disk as uncommitted work if the working copy sat on it")
1336 1336
    );
…
256 unchanged lines
1593 1593
    let repo = open()?;
1594 1594
    let h = repo.resolve_change(change)?;
1595 1595
    let (h1, h2) = repo.split(&h, paths)?;
1596 -
    let c1 = repo.store().get_change(&h1)?;
1597 -
    let c2 = repo.store().get_change(&h2)?;
1596 +
    let c1 = repo.store().get_change_meta(&h1)?;
1597 +
    let c2 = repo.store().get_change_meta(&h2)?;
1598 1598
    println!(
1599 1599
        "{} into {} {} and {} {}",
1600 1600
        ui::done("Split"),
1601 -
        ui::id(short_id(&c1)),
1601 +
        ui::id(c1.change_id.short(8)),
1602 1602
        ui::hash(format!("#{}", h1.short(12))),
1603 -
        ui::id(short_id(&c2)),
1603 +
        ui::id(c2.change_id.short(8)),
1604 1604
        ui::hash(format!("#{}", h2.short(12)))
1605 1605
    );
1606 1606
    Ok(0)
…
254 unchanged lines
1861 1861
    let d = repo.resolve_change(into)?;
1862 1862
    let sp = ui::spinner("Squashing…");
1863 1863
    let h = repo.squash(&c, &d)?;
1864 -
    let new = repo.store().get_change(&h)?;
1864 +
    let new = repo.store().get_change_meta(&h)?;
1865 1865
    sp.done(&format!(
1866 1866
        "{} into {} {}  {}",
1867 1867
        ui::done("Squashed"),
1868 -
        ui::id(short_id(&new)),
1868 +
        ui::id(new.change_id.short(8)),
1869 1869
        ui::hash(format!("#{}", h.short(12))),
1870 1870
        ui::subject(subject_of(&new.message))
1871 1871
    ));
…
35 unchanged lines
1907 1907
        }
1908 1908
        other => other?,
1909 1909
    };
1910 -
    let new = repo.store().get_change(&h)?;
1910 +
    let new = repo.store().get_change_meta(&h)?;
1911 1911
    sp.done(&format!(
1912 1912
        "{} {} {}  {}",
1913 1913
        ui::done("Rebased"),
1914 -
        ui::id(short_id(&new)),
1914 +
        ui::id(new.change_id.short(8)),
1915 1915
        ui::hash(format!("#{}", h.short(12))),
1916 1916
        ui::dim(format!(
1917 1917
            "now depends on {}",
…
5 unchanged lines