Martin von Zweigbergk
40aa9741ec
op_heads_store: move lock and updating of heads on disk to new type ( #111 )
...
We had a few lines of similar code where we added a new of the
operation log and then removed the old heads. By moving that code into
a new type, we prepare for further refactorings.
2022-03-26 22:31:49 -07:00
Martin von Zweigbergk
39838a76bf
view: move merging of views up to repo level ( #111 )
...
I want to make it so when we apply a repo-level change that removes a
head, we rebase descendants of that head onto the closes visible
ancestor, or onto its successor if the head has been rewritten (see
#111 for details). The view itself doesn't have enough information for
that; we need repo-level information (to figure out relationships
between commits).
The view doesn't have enough information to do the.
2022-03-26 22:31:49 -07:00
Martin von Zweigbergk
a663a5d89c
repo: don't abandon empty commit if it has descendants
...
It's unusual for the current commit to have descendants, but it can
happen. In particular, it can easily happen when you run `jj new`. You
probably don't want to abandon it in those cases.
2022-03-26 21:11:42 -07:00
Martin von Zweigbergk
0ceb4f0dce
cli: teach jj new
to set initial description with -m
...
I rarely use `jj new`, so this feature is mostly for use in tests.
2022-03-26 21:11:42 -07:00
Martin von Zweigbergk
23c7581ce1
tests: add a convenience function for running jj
successfully
...
We very often expect success, and we sometimes want to get the stdout,
too. Let's add a convenience function for that. It saves a lot of
lines of code.
2022-03-26 21:11:42 -07:00
Martin von Zweigbergk
03aad3ac2e
cli: don't explicitly indicate positional argument's index
...
I had accidentally given the two positional arguments for `jj git
remote add` the same index. While fixing that, I realized that maybe
`clap` can infer the index based on the declaration order in the
struct. That does indeed seem to work, so I just removed all the
explicit `index` arguments instead.
2022-03-23 22:22:53 -07:00
Martin von Zweigbergk
9e6e5f3d54
cli: make functions delegating to subcommand a single expression
2022-03-23 15:17:21 -07:00
Martin von Zweigbergk
66fe23b4e9
cli: switch from clap
's Builder API to its Derive API
...
The Derive API is easier to work with, less error-prone, and less
verbose, so it seems like a good improvement.
It was quite a bit of work to make the switch, and I'll be surprised
if I didn't make any mistakes in the translation. We unfortunately
don't have enough e2e tests to be very confident, so we'll have to fix
any problems as we discover them.
I've at least verified that the output of `jj debug completion --fish`
is unchanged, except for a few help texts I changed for different
reasons (consistency, clarity, avoiding redundancy).
2022-03-23 15:17:21 -07:00
Martin von Zweigbergk
11afbc70f9
cli: delete unimplemented jj debug writeworkingcopy
command
...
I deleted the implementtion a long time ago, but I forgot to remove it
from the `clap::Command`.
2022-03-23 15:17:21 -07:00
Martin von Zweigbergk
bf62e1789f
cargo: update lock file
...
With the current dependencies in the lock file, we cannot use `clap`'s
"derive" feature, which I'd like to do.
2022-03-23 15:17:21 -07:00
Martin von Zweigbergk
2f59e8b68a
cli: respect $NO_COLOR
environment variable
2022-03-23 09:57:42 -07:00
Martin von Zweigbergk
7ba1c6bdb6
config: add support for a $JJ_CONFIG
environment variable
...
It's useful for tests, scripts, and debugging to be able to use
specific config instead of the user's config. That's especially true
for our automated tests because they didn't have a place to read
config from on Windows before this patch (they read their config from
`{FOLDERID_RoamingAppData}`, which I don't think we can override in
tests).
2022-03-23 09:57:42 -07:00
Martin von Zweigbergk
3b507e4a2e
config: use platform-specific directory separator in jj/config.toml
...
I don't know if Windows actually cares, but it seems more correct this
way.
2022-03-23 09:57:42 -07:00
Martin von Zweigbergk
095fb9fef4
config: drop support for ~/.jjconfig
...
I'm a little hesitant to do this because most tools I'm familiar with
have the config file directly in `~/`. It's also easier to describe
where to put the file if it doesn't vary across platforms. But we're
still early in the project, so let's try it and see if we get any
complaints.
2022-03-23 09:57:42 -07:00
Martin von Zweigbergk
1d3f909a3b
config: move reading of config from lib crate to CLI crate
...
The library crate should be usable by e.g. server processes, so it
should not read from the current user's home directory.
2022-03-23 09:57:42 -07:00
Martin von Zweigbergk
eff615998f
github: add reminder in PR template about updating the changelog
2022-03-23 09:57:42 -07:00
dependabot[bot]
302b4025d5
cargo: bump test-case from 2.0.0 to 2.0.1
...
Bumps [test-case](https://github.com/frondeus/test-case ) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/frondeus/test-case/releases )
- [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md )
- [Commits](https://github.com/frondeus/test-case/compare/v2.0.0...v2.0.1 )
---
updated-dependencies:
- dependency-name: test-case
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 09:33:22 -07:00
Martin von Zweigbergk
b4e6fab1af
github: restrict Clippy's access again
...
It seems "checks" is the permissions it needs to be able to comment on
pull-requests.
2022-03-18 22:51:25 -07:00
Martin von Zweigbergk
3f24411bbf
cargo: upgrade the config
crate from 0.11.0 to 0.12.0
...
This required a bit of work.
2022-03-18 22:33:04 -07:00
dependabot[bot]
36a575ccbf
github: bump actions-rs/cargo from 1.0.1 to 1.0.3
...
Bumps [actions-rs/cargo](https://github.com/actions-rs/cargo ) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/actions-rs/cargo/releases )
- [Changelog](https://github.com/actions-rs/cargo/blob/master/CHANGELOG.md )
- [Commits](ae10961054...844f36862e
)
---
updated-dependencies:
- dependency-name: actions-rs/cargo
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-18 08:53:12 -07:00
dependabot[bot]
bde79f7a60
github: bump actions-rs/toolchain from 1.0.6 to 1.0.7
...
Bumps [actions-rs/toolchain](https://github.com/actions-rs/toolchain ) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/actions-rs/toolchain/releases )
- [Changelog](https://github.com/actions-rs/toolchain/blob/master/CHANGELOG.md )
- [Commits](b2417cde72...16499b5e05
)
---
updated-dependencies:
- dependency-name: actions-rs/toolchain
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-18 08:45:06 -07:00
Martin von Zweigbergk
53721f7d25
github: pin cachix/install-nix-action
version by hash
2022-03-17 09:19:12 -07:00
Martin von Zweigbergk
23c92ccf45
github: pin actions-rs/clippy-check
version by hash
2022-03-17 09:19:12 -07:00
Martin von Zweigbergk
de56053531
github: pin actions-rs/toolchain
version by hash
2022-03-17 09:19:12 -07:00
Martin von Zweigbergk
d6967fd690
github: pin actions/upload-release-asset
version by hash
2022-03-17 09:19:12 -07:00
Martin von Zweigbergk
13f7354cfe
github: pin actions-rs/cargo
version by hash
2022-03-17 09:19:12 -07:00
Martin von Zweigbergk
b36e50c09d
github: pin actions/checkout
version by hash
2022-03-17 09:19:12 -07:00
Martin von Zweigbergk
cc13a2ec84
release: include the two recent no-op releases in the changelog
...
I keep forgetting to update things while doing a release...
2022-03-17 06:03:10 -07:00
dependabot[bot]
4fab28ffc6
github: bump actions/checkout from 2 to 3
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 22:57:55 -07:00
Martin von Zweigbergk
2a76572653
docs: add pointer to pre-built binary releases ( #73 )
...
Users now have the option of installing from source or directly
installing a binary.
I also corrected some text that effectively said that installing a Nix
flake is not installing from source, but I think it actually does
install from source.
2022-03-16 22:57:38 -07:00
dependabot[bot]
30e3685f5e
cargo: bump regex from 1.5.4 to 1.5.5
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.4 to 1.5.5.
- [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.5.4...1.5.5 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 22:57:09 -07:00
dependabot[bot]
f14b1260e5
cargo: bump rand from 0.8.4 to 0.8.5
...
Bumps [rand](https://github.com/rust-random/rand ) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/rust-random/rand/releases )
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/rand/compare/0.8.4...0.8.5 )
---
updated-dependencies:
- dependency-name: rand
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 22:27:45 -07:00
dependabot[bot]
85d4ac7d47
cargo: bump clap from 3.1.2 to 3.1.6
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.2 to 3.1.6.
- [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/v3.1.2...v3.1.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 22:12:52 -07:00
dependabot[bot]
a8f881b84c
cargo: bump test-case from 1.2.3 to 2.0.0
...
Bumps [test-case](https://github.com/frondeus/test-case ) from 1.2.3 to 2.0.0.
- [Release notes](https://github.com/frondeus/test-case/releases )
- [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md )
- [Commits](https://github.com/frondeus/test-case/compare/v1.2.3...v2.0.0 )
---
updated-dependencies:
- dependency-name: test-case
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 22:07:44 -07:00
dependabot[bot]
5f3877fc6b
github: bump actions/upload-release-asset from 1.0.1 to 1.0.2
...
Bumps [actions/upload-release-asset](https://github.com/actions/upload-release-asset ) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/actions/upload-release-asset/releases )
- [Commits](https://github.com/actions/upload-release-asset/compare/v1.0.1...v1.0.2 )
---
updated-dependencies:
- dependency-name: actions/upload-release-asset
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:56:45 -07:00
dependabot[bot]
3f7daa6b04
github: bump actions/upload-artifact from 2.3.1 to 3
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 2.3.1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](82c141cc51...6673cd052c
)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:55:06 -07:00
dependabot[bot]
c8b32238f9
cargo: bump zstd from 0.10.0+zstd.1.5.2 to 0.11.1+zstd.1.5.2
...
Bumps [zstd](https://github.com/gyscos/zstd-rs ) from 0.10.0+zstd.1.5.2 to 0.11.1+zstd.1.5.2.
- [Release notes](https://github.com/gyscos/zstd-rs/releases )
- [Commits](https://github.com/gyscos/zstd-rs/commits )
---
updated-dependencies:
- dependency-name: zstd
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:52:29 -07:00
dependabot[bot]
65bc87f57d
cargo: bump serde_json from 1.0.78 to 1.0.79
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.78 to 1.0.79.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.78...v1.0.79 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:52:06 -07:00
dependabot[bot]
b56435d609
cargo: bump indoc from 1.0.3 to 1.0.4
...
Bumps [indoc](https://github.com/dtolnay/indoc ) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/dtolnay/indoc/releases )
- [Commits](https://github.com/dtolnay/indoc/compare/1.0.3...1.0.4 )
---
updated-dependencies:
- dependency-name: indoc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:51:53 -07:00
dependabot[bot]
fae61bad79
cargo: bump blake2 from 0.10.2 to 0.10.4
...
Bumps [blake2](https://github.com/RustCrypto/hashes ) from 0.10.2 to 0.10.4.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/commits )
---
updated-dependencies:
- dependency-name: blake2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:51:29 -07:00
dependabot[bot]
51b12ff4b4
github: bump github/codeql-action from 1.0.26 to 1.1.5
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 1.0.26 to 1.1.5.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](5f53256358...8834766498
)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:42:18 -07:00
dependabot[bot]
d90e7b93e8
github: bump cachix/install-nix-action from 14.1 to 16
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from 14.1 to 16.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/v14.1...v16 )
---
updated-dependencies:
- dependency-name: cachix/install-nix-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:41:20 -07:00
dependabot[bot]
2fdd8bc60b
cargo: bump clap_complete from 3.1.0 to 3.1.1
...
Bumps [clap_complete](https://github.com/clap-rs/clap ) from 3.1.0 to 3.1.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-v3.1.0...clap_complete-v3.1.1 )
---
updated-dependencies:
- dependency-name: clap_complete
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:37:27 -07:00
dependabot[bot]
0ea6f47dc5
cargo: bump textwrap from 0.14.2 to 0.15.0
...
Bumps [textwrap](https://github.com/mgeisler/textwrap ) from 0.14.2 to 0.15.0.
- [Release notes](https://github.com/mgeisler/textwrap/releases )
- [Changelog](https://github.com/mgeisler/textwrap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mgeisler/textwrap/compare/0.14.2...0.15.0 )
---
updated-dependencies:
- dependency-name: textwrap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 21:31:22 -07:00
Martin von Zweigbergk
8b6932f837
github: add a dependabot config
...
This was another security recommendation for projects by Google
employees.
2022-03-16 21:09:01 -07:00
Martin von Zweigbergk
b5659ec680
github: give Clippy action full permissions
...
I've found it hard to figure out which actions need which
permissions. GitHub doesn't seem to even document what the permissions
mean. So let's just give Clippy full access.
2022-03-16 20:28:54 -07:00
Martin von Zweigbergk
af76631021
github: set top-level permissions to readonly for all workflows
...
The new code scanner is complaining that actions have permissions to
do too much. It wasn't obvious to me what permissions the jobs need,
but let's see how this works.
2022-03-16 19:59:08 -07:00
Martin von Zweigbergk
168d986827
release: bump version to 0.3.3 (skipping 0.3.2)
...
I forgot to bump the version to 0.3.2 before tagging and releasing it,
so the released 0.3.2 has version number 0.3.1 in the source code and
(therefore) reported from `jj --version`. I'm therefore bumping it
from 0.3.1 to 0.3.3 now, so there can be a matching 0.3.3 release.
2022-03-16 12:20:52 -07:00
Martin von Zweigbergk
73a0f72ffa
github: new attempt at setting up automated release builds ( #73 )
...
My attempt at using rust-build/rust-build.action for release builds
(from bf21e65c5d
) initially seemed promising. However, the produced
musl binary build segfaulted on my Debian machine. I don't know about
the Mac and Windows binaries. I then tried switching to building with
a vendored OpenSSL (cac93e2793
), but then the build started failing
(https://github.com/martinvonz/jj/actions/runs/1978730621 ). I couldn't
figure out why it failed, so I decided to do the build in a more
manual way (without rust-build/rust-build.action), based on
https://github.com/gitext-rs/git-stack/blob/main/.github/workflows/post-release.yml
(thanks to @epage for the example and to @arxanas for the link). I
could simplify it a bit because I'm currently doing the releases via
the GitHub UI (epage's original triggers the release when a tag has
been pushed, IIUC). Let's hope that it works this time.
2022-03-16 11:25:59 -07:00
Martin von Zweigbergk
a8f334dc35
github: add OSSF Scorecards security scanner
...
This is a new recommendation for GitHub projects by Google employees.
2022-03-15 09:47:11 -07:00