Commit Graph

4123 Commits

Author SHA1 Message Date
Vincent Breitmoser
e8239c7f4e docs: add information about Change ID scope to glossary 2023-08-29 22:24:48 -07:00
Vamsi Avula
32377a13f4 templates: default placeholders to red
With the idea that less severe placeholders (like description) could
(and should) explicitly "opt out".

(Both email and name placeholders will be red with this change.)
2023-08-30 12:54:15 +08:00
Vamsi Avula
dbf13a5250 tests: add test for log builtin templates with colors 2023-08-30 12:54:15 +08:00
dependabot[bot]
81b620babb cargo: bump the cargo-dependencies group with 3 updates
Bumps the cargo-dependencies group with 3 updates: [clap](https://github.com/clap-rs/clap), [chrono](https://github.com/chronotope/chrono) and [rustix](https://github.com/bytecodealliance/rustix).


Updates `clap` from 4.4.0 to 4.4.1
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.4.0...v4.4.1)

Updates `chrono` from 0.4.26 to 0.4.27
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.26...v0.4.27)

Updates `rustix` from 0.38.9 to 0.38.10
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.9...v0.38.10)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-29 16:42:58 -07:00
Martin von Zweigbergk
145b0b24d8 commit: drop merged_ prefix from tree() and tree_id()
The old `tree()` and `tree_id()` functions are now gone, so we can use
those names for the new functions.
2023-08-29 08:32:04 -07:00
Martin von Zweigbergk
f54b456e64 working_copy: leverage Store::get_root_tree() in current_tree()
I guess I forgot this when I added `Store::get_root_tree()`.
2023-08-29 08:32:04 -07:00
Martin von Zweigbergk
2d50d8a077 merged_tree: propagate errors from from_legacy_tree() 2023-08-29 08:32:04 -07:00
Martin von Zweigbergk
67832a3940 merged_tree: take store argument to write_tree() instead of new()
The store isn't needed until we write the trees, so I think it makes
more sense to pass it there.
2023-08-29 08:32:04 -07:00
Martin von Zweigbergk
64b47bae56 tree: inline legacy_id() into its sole caller 2023-08-29 07:01:52 -07:00
Martin von Zweigbergk
d9ce70c176 tests: make create_tree() return MergedTree
I think most tests want a `MergedTree`, so this makes `create_tree()`
return that. I kept the old function as `create_single_tree()`. That's
now only used in `test_merge_trees` and `test_merged_tree`.

I also consistently imported the functions now, something I've
considered doing for a long time.
2023-08-29 07:01:52 -07:00
Martin von Zweigbergk
e4c6595620 tests: make create_random_tree() return a MergedTreeId 2023-08-29 07:01:52 -07:00
Martin von Zweigbergk
9c77e6aa8c commit_builder: remove last traces of pre-MergedTree API 2023-08-29 07:01:52 -07:00
Martin von Zweigbergk
6e3590f5cd tests: remove last uses of Commit:tree() and delete it 2023-08-29 07:01:52 -07:00
Yuya Nishihara
55c6e90555 git: remove handling of real remote named "git", always override
#1690
2023-08-29 22:50:46 +09:00
Yuya Nishihara
ce3d28e234 git: do not import refs from remote named "git"
I made it simply fail on explicit fetch/import, and ignored on implicit import.
Since the error mode is predictable and less likely to occur. I don't think it
makes sense to implement warning propagation just for this.

Closes #1690.
2023-08-29 22:50:46 +09:00
Yuya Nishihara
04e2f5ed20 git: fix typo in GitFetchError message 2023-08-29 22:50:46 +09:00
Yuya Nishihara
35a596ff66 git: prohibit creation of remote named "git"
#1690
2023-08-29 22:50:46 +09:00
Yuya Nishihara
0e26ef7733 git: add constant for pseudo remote name "git" 2023-08-29 22:50:46 +09:00
Martin von Zweigbergk
f47da04a43 tree: delete recursive diff iterator, which is no longer used 2023-08-28 16:21:44 -07:00
Martin von Zweigbergk
1b24b522f6 tree: move diff_summary() to MergedTree 2023-08-28 16:21:44 -07:00
Martin von Zweigbergk
a7a2150328 tree: delete unused DiffSummary::is_empty() 2023-08-28 16:21:44 -07:00
Martin von Zweigbergk
dc06bbc7d1 commit: migrate remaining uses of Commit::tree_id() and delete it 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
7bfd439bd1 rewrite: return MergedTree from merge_commit_trees_without_repo() 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
90e78a1424 rewrite: return MergedTree from merge_commit_trees() 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
494026a9bf cli: merge trees via MergedTree in rebase_to_dest_parent() 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
bd6098e09e cli: merge trees via MergedTree in jj move 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
873a6f0674 merged_tree: add a function for merging 3 MergedTrees
With the already existing `MergedTree::resolve()` and all the recent
refactorings into `Merge<T>`, it's now very easy to add support for
3-way merging of `MergedTree` instances.
2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
1674a421ec commit_builder: take MergedTreeId for root id argument 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
e5ec99d159 backout: propagate error from merging of trees 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
b19afb6d45 cli: migrate jj untrack to MergedTree API 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
6d89f0c0a0 cli: migrate jj restore to MergedTree API 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
a0291e99d7 cli: migrate cat, files & git submodule print to MergedTree API 2023-08-28 15:58:34 -07:00
Martin von Zweigbergk
d753c85e01 cli: migrate most diff-editing functions to MergedTree API 2023-08-28 15:58:34 -07:00
Ilya Grigoriev
d3428d63a2 nix: Add poetry to devDependencies for nix develop
This should allow Nix users to build the documentation in
`nix develop` following the instructions in `contributing.md`.

It feels a little weird to add a package manager and ask
people to use it inside nix, but I think it's simpler
than having two sets of instructions and dependencies
to maintain.
2023-08-28 10:43:48 -07:00
Ilya Grigoriev
b67c115c29 docs: goodbye Github, hello GitHub 2023-08-28 10:43:48 -07:00
Ilya Grigoriev
c8bb8fbeb2 Github actions to build docs
One action publishes the 'prerelease' version on every push
to `main`.

The other publishes a 'latest' version on every releasse.

I tested both of them, but not with branch protection rules.
2023-08-28 10:43:48 -07:00
Ilya Grigoriev
8f29afaafd docs: markdown fixups, mostly to remove links pointing outside docs
This makes mkdocs compile cleanly
2023-08-28 10:43:48 -07:00
Ilya Grigoriev
fc49258d2f docs: Set up mkdocs and poetry
I initially was thinking of using `mdbook`, which looks a little better, but I
think versioning the docs is important, and the features I want are pretty much
only supported by the Mkdocs' "Material" theme. 

Mkdocs is written in Python. The prerequesites for building docs on your
machine should be to install Python and Poetry, everything else should be
installed automatically by Poetry. See the edits to `contributing.md` for more details.
2023-08-28 10:43:48 -07:00
Ilya Grigoriev
623c5e28c2 docs: change "shell script" codeblock to "shell"
```shell script
    ```

breaks mkdocs rendering
2023-08-28 10:43:48 -07:00
Ilya Grigoriev
64140c34b7 docs: Move installation instructions from README to docs/
This allows the tutorial to reference them and will make it
easier to have different instructions for different versions.

We can later restore some instructions to the README, but I
think this is important since the installation instructions
do change in important (even if slight) ways from time to
time.
2023-08-28 10:43:48 -07:00
Ilya Grigoriev
d3bd1af37b docs: minor markdown fixups
I am not sure these are necessary with `mkdocs` that I settled on,
but this allows `mdbook` to parse the markdown properly.
2023-08-28 10:43:48 -07:00
dependabot[bot]
9d7419497c cargo: bump the cargo-dependencies group with 3 updates
Bumps the cargo-dependencies group with 3 updates: [regex](https://github.com/rust-lang/regex), [rustix](https://github.com/bytecodealliance/rustix) and [serde](https://github.com/serde-rs/serde).


Updates `regex` from 1.9.3 to 1.9.4
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.3...1.9.4)

Updates `rustix` from 0.38.8 to 0.38.9
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.8...v0.38.9)

Updates `serde` from 1.0.186 to 1.0.188
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.186...v1.0.188)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 09:13:46 -07:00
Martin von Zweigbergk
732e448458 diff_util: use MergedTree throughout
This switches the whole `diff_util` module to working with
`MergedTree`, `Merge<Option<TreeValue>>` etc., so it can support
tree-level conflicts.

Since we want to avoid using `ConflictId`s, I switched the hash we use
for conflicts in `--git` style diffs to use an all-'0' id instead of
using the conflict id.
2023-08-27 07:50:28 -07:00
Martin von Zweigbergk
5309335405 diff_util: make diff_content() return empty for missing path
I'm not sure this is a win on its own, but it simplifies coming
patches.
2023-08-27 07:50:28 -07:00
Martin von Zweigbergk
5ef925deb8 diff_util: unify handling of unexpected cases
This moves the error cases last in each `match` block, switches to
using format strings, and includes the full value in the message.
2023-08-27 07:50:28 -07:00
Martin von Zweigbergk
6df7db3dc0 merge_tools: pass MergedTree to run_mergetool() 2023-08-27 07:35:01 -07:00
Martin von Zweigbergk
17fe5e39c5 merge_tools: pass MergedTrees to edit_diff() 2023-08-27 07:35:01 -07:00
Martin von Zweigbergk
54b9ecce68 merge_tools: pass MergeTree to run_mergetool_external() 2023-08-27 07:35:01 -07:00
Martin von Zweigbergk
a7e5ea06c0 tests: make test helper for snapshotting working copy return MergedTree 2023-08-27 06:49:45 -07:00
Martin von Zweigbergk
1895a55157 working_copy: make old_checkout argument be MergedTreeId
I think this was the last piece for making the working copy handle
tree-level conflicts.
2023-08-27 06:49:45 -07:00