ok/jj
1
0
Fork 0
forked from mirrors/jj
Commit graph

1493 commits

Author SHA1 Message Date
Martin von Zweigbergk
47e7307dcc cargo: run cargo update
Our current version of `cpufeatures` was yanked so we needed to
upgrade at least that. Note that I had to add "UNICODE-DFS-2016" as an
allowed license for `cargo-deny`. I also had to upgrade `chrono` from
0.4.20 to 0.4.22 in the `Cargo.toml` files to prevent `cargo update`
from *downgrading* it in the lock file.
2022-09-06 15:50:05 -07:00
Martin von Zweigbergk
4ea304a47d cli: add jj hide as an alias for jj abandon
I keep explaining the functionality as hiding the commit, so it seems
that `jj hide` is a natural name for it. Let's start by adding it as
an alias. My only hesitation with making `hide` the real command name
and `abandon` an alias that we start phasing out is that it feels more
natural to `abandon` the working copy in order to start working on a
new change than it does to `hide` it.
2022-09-04 20:43:01 -07:00
Martin von Zweigbergk
2ff710a131 github: enable auto-merge on Dependabot PRs
To merge a Dependabot PR, I have to enable auto-merge (two clicks,
including one to confim) and then review and approve it. Since our
branch protections require the PR to be approved, it seems that that
should be enough. This patch adds a GitHub action that calls runs the
GitHub CLI to do that. It is based on
https://dev.to/slashgear_/how-to-automatically-merge-dependabot-pull-requests-with-github-actions--30pe
2022-09-02 11:49:26 -07:00
dependabot[bot]
ff2e6c9c5b cargo: bump clap from 3.2.19 to 3.2.20
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.19 to 3.2.20.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.20/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.19...v3.2.20)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 08:43:20 -07:00
Glen Choo
468418f1ce cli: add interdiff command
Add the `jj interdiff` command for comparing only the diffs of commits.
Its args are identical to that of `jj diff`, minus `--revision` (because
interdiff always requires two commits).

Like `jj obslog -p`, Changes introduced by intervening commits are
ignored by rebasing `--from` onto `--to` 's parents.
2022-09-02 02:59:37 +08:00
Glen Choo
ed415c17b0 cli: refactor out rebase_to_destination_parent()
Refactor out the parent-rebasing parts of show_predecessor_patch() to
create rebase_to_destination_parent(). This will be reused for `jj
interdiff`.
2022-09-02 02:59:37 +08:00
dependabot[bot]
d53d9020c9 cargo: bump insta from 1.19.0 to 1.19.1
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.19.0...1.19.1)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 10:50:49 -07:00
dependabot[bot]
989fcb6276 cargo: bump thiserror from 1.0.32 to 1.0.33
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.32 to 1.0.33.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.32...1.0.33)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 10:50:30 -07:00
dependabot[bot]
cdbb24fdd4 cargo: bump clap from 3.2.18 to 3.2.19
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.18 to 3.2.19.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.19/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.18...v3.2.19)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 10:50:01 -07:00
dependabot[bot]
471a5c81d7 cargo: bump clap_mangen from 0.1.10 to 0.1.11
Bumps [clap_mangen](https://github.com/clap-rs/clap) from 0.1.10 to 0.1.11.
- [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_mangen-v0.1.10...clap_mangen-v0.1.11)

---
updated-dependencies:
- dependency-name: clap_mangen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 10:49:28 -07:00
dependabot[bot]
f0d7381fa6 github: bump github/codeql-action from 2.1.19 to 2.1.22
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.19 to 2.1.22.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f5d217be74...b398f525a5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 10:49:04 -07:00
Yuya Nishihara
c5aab9fe29 cli: fix crash on "jj merge whatever root" 2022-09-01 13:36:17 +09:00
Yuya Nishihara
1cc7fc4cd9 cli: error out if "new" parent revisions aren't unique
If more than one parents are specified, the user would expect a merge
commit.
2022-09-01 13:36:17 +09:00
Martin von Zweigbergk
3a46623446 cli: make jj merge delegate to jj new 2022-08-31 07:51:32 -07:00
Martin von Zweigbergk
d3286c2847 tests: use jj new instead of jj merge in tests
Because `jj new` updates to the new commit, this makes them a little
simpler.
2022-08-31 07:51:32 -07:00
Martin von Zweigbergk
a1a980d395 cli: make jj new create a merge commit if more than one arg given
`jj merge` just creates an empty change, which is practically the same
as `jj new`. The main difference is that the former requires more than
one argument and the latter requires at most one argument. It seems
cleaner to generalize them and make them aliases. This patch starts
doing that by making `jj new` accept more than one argument.

Instead of having `jj merge` be exactly an alias for `jj new`, we may
want to make it a thin wrapper that just checks that more than one
argument was given. That would probably be less confusing to users who
run `jj merge` without arguments to see what it does.

We should probably make `jj checkout` also be an alias for `jj new`,
but that will have to wait until we have removed support for open
commits (since `jj checkout` still has logic for dealing with open
commits).
2022-08-31 07:51:32 -07:00
Martin von Zweigbergk
0d1c23bf02 changelog: asking for a combined description is a feature, not a bug fix
I suppose it could be seen as a bug fix that we no longer discard a
description without asking, but it was intentionally done the way it
was before.

While at it, I also clarified that the source commit gets abandoned if
it becomes empty.
2022-08-31 01:03:01 -07:00
Martin von Zweigbergk
b5378caa81 cli: make jj move/squash/unsquash ask for combined description
In 8ae9540f2c, I made `jj move/squash/unsquash` not abandon the
working copy if it became empty because that would lose any
description associated with it. It turned out that the new behavior
was also confusing because it made it unclear if the working-copy
commit was actually abandoned. Let's roll back that change and instead
ask the user for a combined description when both the source and
destination commits have non-empty descriptions. Not discarding a
non-empty description seems like a good improvement regardless of the
behavior related to working-copy commits. It's also how `hg fold`
behaves (though hg doesn't allow the description to be empty).
2022-08-30 21:41:26 -07:00
Martin von Zweigbergk
478dfd74fc tests: teach fake editor to check that initial text is as expected 2022-08-30 21:41:26 -07:00
Ilya Grigoriev
7dbb8e0fa2 Have jj merge print id of the created commit
I was using a custom `jj log` command and had some trouble finding
 the commit `jj merge` created. The default `jj log` command shows it
 by default, but my custom one didn't.
2022-08-30 20:43:11 -07:00
dependabot[bot]
6d33ec5dbf cargo: bump clap from 3.2.17 to 3.2.18
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.17 to 3.2.18.
- [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.2.17...v3.2.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 16:18:15 -07:00
Jonathan Tan
a9606a8269 tests: stop libgit2 from accessing config files
libgit2 by default will respect config files present on a user's
machine---in particular, when creating a new repo, it will read
`init.defaultBranch` to determine what the name of the default branch
should be. This makes the tests non-hermetic, so disable that feature.

On my machine, `init.defaultBranch` is set in system config. Without
this patch, `test_git_colocated` and
`test_git_colocated_rebase_on_import` fail, but with this patch, they
pass.
2022-08-30 14:45:02 -07:00
Martin von Zweigbergk
cc77a232a1 readme: explain that Rust >= 1.60 is needed
We have `rust-version = "1.60"` in `Cargo.toml`, but Cargo doesn't
check that until after dependency resolution, which fails if you have
an older version (I don't know why).
2022-08-29 17:24:57 -07:00
Martin von Zweigbergk
c83e563879 readme: make link to Discard a button 2022-08-28 14:36:25 -07:00
Martin von Zweigbergk
0d1bf7cb3b cli: disable open commits by default 2022-08-26 23:34:52 -07:00
Martin von Zweigbergk
36b98f25fa tests: replace a jj open X; jj co X by jj edit X
We now allow editing a closed commit, so let's do that. That makes the
impact on tests a bit smaller when we disable open commits by default
next.
2022-08-26 23:34:52 -07:00
Martin von Zweigbergk
cd458ec96b cli: teach jj checkout a -m flag, to match jj new
The two commands are very similar and we should probably make one an
alias of the other (or just delete one), but for now let's at least
make them more similar by supporting `-m` for both.

I currently think `jj new` is more natural when starting a new change
on top of the current one and `jj checkout` is more natural when
starting a new change on top of another one, as well as when you just
want to look around or run tests. `jj checkout` doesn't currently
default to the working copy like `jj new` does. Perhaps we should make
it do that. Will people eventually feel that it's natural to run `jj
checkout` to create a new change on top of the working copy, or will
they feel that it's natural to run `jj new` on an unrelated commit
even to just look around, or will we want them as synonyms forever?
2022-08-26 23:34:52 -07:00
Martin von Zweigbergk
22e9997563 cli: remove some obsolete messages about conflicts
We have supported conflicts in the working copy for a long time (since
ea82340654), but I had forgotten to update a few references to the
old behavior.
2022-08-26 23:05:06 -07:00
Martin von Zweigbergk
b8f59f419c docs: hyphenate "working-copy" when used as a compound modifier 2022-08-25 18:08:36 -07:00
Martin von Zweigbergk
16cb7fdee8 docs: describe the foo@ revset syntax
We have supported multiple workspaces for six months now, but I forgot
to remove a note in the revset doc saying that we don't support
it. Also update the text to descibe how to refer to the working-copy
commit in another workspace.
2022-08-25 18:08:36 -07:00
Martin von Zweigbergk
a6a9527ba5 docs: describe how to use multiple workspaces
We have had support for workspaces for six months, but I forgot to
update the documentation.

This just adds some basic documentation; we can add more later.
2022-08-25 18:08:36 -07:00
dependabot[bot]
f8fd713bb8 cargo: bump serde_json from 1.0.83 to 1.0.85
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.83 to 1.0.85.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.83...v1.0.85)

---
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-08-22 23:01:24 -07:00
dependabot[bot]
c52e83e54d cargo: bump serde from 1.0.143 to 1.0.144
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.143 to 1.0.144.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.143...v1.0.144)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 23:01:04 -07:00
Martin von Zweigbergk
8b049cebd1 github: remove incorrect "v" prefix in a cargo-deny-action hash 2022-08-22 20:29:35 -07:00
Augie Fackler
e0208b9e8c workflows: pin action versions for cargo-deny checks 2022-08-22 22:33:37 -04:00
Augie Fackler
679cd4cd95 deny: run as a github action so it's tested in CI
I think I did this right?
2022-08-22 22:33:37 -04:00
Augie Fackler
6f21b321b0 deny: new config file for cargo-deny
This lets us quickly check for vulnerabilities and licenses we don't want.
2022-08-22 22:33:37 -04:00
Augie Fackler
298a972d4a chrono: update to latest version and disable oldtime feature
`oldtime` brings in an old version of the `time` crate, which we
don't need and has some issues reported in RustSec.
2022-08-22 22:33:37 -04:00
Augie Fackler
d7004085a0 pest: update to 2.3.x since 2.2.x has some yanked versions
Detected with cargo-deny.
2022-08-22 22:33:37 -04:00
dependabot[bot]
27c2a55091 cargo: bump insta from 1.18.2 to 1.19.0
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.18.2...1.19.0)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 16:26:20 -07:00
dependabot[bot]
ef987e9049 github: bump github/codeql-action from 2.1.18 to 2.1.19
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.18 to 2.1.19.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2ca79b6fa8...f5d217be74)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 09:02:58 -07:00
Martin von Zweigbergk
36354e4fa5 readme: add a pointer to the Discord server 2022-08-18 20:15:35 -07:00
Martin von Zweigbergk
7722223902 readme: clarify in the heading that this is a VCS 2022-08-18 20:15:35 -07:00
Yuya Nishihara
7eed4068e9 cli: do not discard working copy changes recovered from stale state
Otherwise the subsequent command would rerun the checkout, which would fail
if the diff contained added files.
2022-08-19 00:11:23 +09:00
Yuya Nishihara
51520bc87b working_copy: don't follow symlinks while creating parent directories
Otherwise a file could be created out of the working copy directory.

This only works for untracked symlinks and sequentially "added" symlinks
and files. For "removed" and "modified" entries, the parent directories are
considered valid and fs::remove_file() will be called. This also doesn't
prevent race conditions caused by concurrent checkouts.

New create_parent_dirs() would be slightly slower than the original because
it traverses directories from the root whereas fs::create_dir_all() does that
from the leaf and exits when reached to a directory.
2022-08-17 13:22:51 +09:00
Yuya Nishihara
fbcec1fd2c tests: don't leave /tmp/file, use tempfile::TempDir for cleanup 2022-08-17 12:15:04 +09:00
dependabot[bot]
6238f9b369 cargo: bump clap_complete from 3.2.3 to 3.2.4
Bumps [clap_complete](https://github.com/clap-rs/clap) from 3.2.3 to 3.2.4.
- [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.2.3...clap_complete-v3.2.4)

---
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-08-12 10:18:27 -07:00
dependabot[bot]
c54c8c0519 cargo: bump insta from 1.18.1 to 1.18.2
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.18.1 to 1.18.2.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.18.1...1.18.2)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 10:00:27 -07:00
dependabot[bot]
d7f008f52b cargo: bump clap from 3.2.16 to 3.2.17
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.16 to 3.2.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.17/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 09:59:41 -07:00
Martin von Zweigbergk
21f5bf8b15 cleanup: fix some things reported by clippy 1.63 2022-08-12 09:10:32 -07:00