Commit Graph

1154 Commits

Author SHA1 Message Date
dependabot[bot]
d2d0f8c03e cargo: bump clap_mangen from 0.1.3 to 0.1.4
Bumps [clap_mangen](https://github.com/clap-rs/clap) from 0.1.3 to 0.1.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_mangen-v0.1.3...clap_mangen-v0.1.4)

---
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-04-19 09:15:40 -07:00
dependabot[bot]
82c59c7f3c cargo: bump clap from 3.1.9 to 3.1.10
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.9 to 3.1.10.
- [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.9...v3.1.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-19 09:04:01 -07:00
dependabot[bot]
c94e241e12 cargo: bump clap from 3.1.8 to 3.1.9
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.8 to 3.1.9.
- [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.8...v3.1.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 09:02:15 -07:00
dependabot[bot]
fae965f416 cargo: bump clap_mangen from 0.1.2 to 0.1.3
Bumps [clap_mangen](https://github.com/clap-rs/clap) from 0.1.2 to 0.1.3.
- [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.2...clap_mangen-v0.1.3)

---
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-04-18 08:44:45 -07:00
dependabot[bot]
32a39c52e1 github: bump actions/checkout from 3.0.0 to 3.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a12a3943b4...dcd71f6466)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 08:53:12 -07:00
Martin von Zweigbergk
53911b076b working_copy: fix crash when updating and only executable bit changed 2022-04-14 23:46:28 -07:00
Martin von Zweigbergk
bd035004b9 tests: use jj_cmd_success() in one more place 2022-04-14 23:46:28 -07:00
Martin von Zweigbergk
3c71ae3c76 cli: make jj rebase default to -b @ (#168)
Closes #168.
2022-04-14 23:46:28 -07:00
Martin von Zweigbergk
30f5471fc3 cli: add mode for rebasing branch onto destination (#168) 2022-04-14 23:46:28 -07:00
Martin von Zweigbergk
a6d0f5fe21 cli: extract functions for rebase flavor (#168) 2022-04-14 23:46:28 -07:00
Martin von Zweigbergk
7ec93ddb32 tests: also check output from jj rebase
I'd like to have tests showing the number of commits rebased. I just
missed it when adding the tests.
2022-04-14 23:46:28 -07:00
dependabot[bot]
0a68670c30 cargo: bump config from 0.13.0 to 0.13.1
Bumps [config](https://github.com/mehcode/config-rs) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/mehcode/config-rs/releases)
- [Changelog](https://github.com/mehcode/config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mehcode/config-rs/compare/0.13.0...0.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-14 08:57:35 -07:00
Martin von Zweigbergk
7e79f25508 revset: add a roots() function 2022-04-13 23:24:51 -07:00
Martin von Zweigbergk
9ff21d8924 revset: add a connected() function
This introduces a `connected(x)` function, which is simply the same as
`x:x`. It's occasionally useful if `x` is a long expression. It's also
useful as a building block for `root(x)` (coming soon).
2022-04-13 23:24:51 -07:00
Martin von Zweigbergk
fa6b14f166 revset: rename internal head() to visible_heads() 2022-04-13 23:24:51 -07:00
Martin von Zweigbergk
7aac95ac80 test: add tests for jj rebase 2022-04-13 21:27:30 -07:00
Martin von Zweigbergk
c1e5f88780 cli: don't allow multiple values for jj rebase and jj untrack
Somehow I had thought that setting `clap(required = true)` on a
list-type argument was not enough to convince clap to require at least
one occurrence, but it seems that it does. The `min_values = 1` I had
added to get it to work actually means that we accept multiple values
passed to a single argument (e.g. `jj rebase -d x y z`), which is not
what I had intended.
2022-04-13 21:27:30 -07:00
Martin von Zweigbergk
677dea1682 cli: require at least one destination for rebase
Rebasing onto no commits (i.e. onto the root commit) is almost
definitely not what you meant to do if you run `jj rebase` (without
any arguments).
2022-04-11 15:35:21 -07:00
Martin von Zweigbergk
97a1a3e20b merge: fix modify/delete conflict to not resolve 2022-04-10 18:32:36 -07:00
Martin von Zweigbergk
5a77e88b94 cargo: specify MSRV (1.57 on lib and 1.58 on CLI) 2022-04-10 12:19:07 -07:00
Martin von Zweigbergk
109a9422f0 cli: teach jj split to include all specified paths in first commit 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
d6d2b8b5bc cli: allow overriding ui.editor config by $JJ_EDITOR variable 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
96d559a4b4 cli: allow overriding $EDITOR variable by ui.editor config 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
2958f5791c cli: don't crash if $EDITOR fails 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
f8724ee5a9 tests: add tests for jj describe 2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
90ca03b244 cli: make configs from environment a separate source instead of overrides
This addresses a TODO I had left in the code. In addition to the
reasons I mentioned in the TODO, config sources are also better
because they can be layered. I'm planning on using that for editor
configs, letting `$EDITOR` be a layer under the configs and
`$JJ_EDITOR` be a layer over (matching how `git` does it).
2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
486f49435b cli: if $JJ_CONFIG points to a directory, read all files in it
It's annoying especially for tests to not be able to append to a
config file without knowing the contents (as you have to do with
TOML). Let's read all files in a directory if `$JJ_CONFIG` points to a
directory. Mercurial does that for its `$HGRCPATH` variable.
2022-04-10 09:13:51 -07:00
Martin von Zweigbergk
4be0da3607 cli: teach jj squash to move only changes to specified paths 2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
082ec5ae3b cli: teach jj move to move only changes to specified paths
I quite often want to move the changes to a particular file from one
commit to another. We already support that using `jj move -i`, but
that can be annoying to run because we don't have a TUI for it
(#48). Let's make it possible to do `jj move --from X --to Y <path>`.
2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
385559260c cli: add documentation for remaining few CLI arguments 2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
9a15e32351 cli: require at least one path for jj untrack
It seems very unlikely that the user would want to untrack all paths
(that's still possible with `jj untrack .`, if they really want to,
and have added all their current paths to the `.gitignore`).
2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
88e34d703e cli: let clap error out for us on jj restore -i <file> 2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
3d81d21ff5 tests: fix test checking clap arguments to actually check 2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
bc3c2db828 cli: print errors to stderr 2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
971ca0511b cli: fix formatting of jj help rebase
I think I lost the formatting in the upgrade to clap 3.0.
2022-04-08 18:52:00 -07:00
dependabot[bot]
d9c8f49d91 github: bump github/codeql-action from 2.1.7 to 2.1.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0182a2c78c...1ed1437484)

---
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-04-08 08:46:41 -07:00
Waleed Khan
672f9e85cb github: remove complete directory for releases
This directory doesn't seem to do anything.
2022-04-08 06:08:32 -07:00
dependabot[bot]
f0538a1d06 github: bump cachix/install-nix-action from 16 to 17
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 16 to 17.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](d56f3ce9be...d64e055310)

---
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-04-07 09:26:26 -07:00
Martin von Zweigbergk
a4449cd7bc tests: add tests for jj squash -i 2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
3aa153fb59 tests: add tests for jj squash 2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
3d8d0bea71 tests: add tests for jj move -i 2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
dc41c4bfe4 tests: add tests of jj move 2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
696a583e4e tests: add tests for jj edit on merge commit 2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
066f74a1b4 tests: check set of files passed to diff-editor in jj edit 2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
3907677c51 tests: add tests for jj edit
These tests are very similar to the `jj restore -i` tests because `jj
edit -r $REV` is a specialized version of `jj restore -i --from $REV-
--to $REV` on non-merge commits.
2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
7a013a59ae cli: add a command for printing the contents of a file in a revision
I'm adding this mostly because it's useful for testing. That's also
the reason it supports displaying conflicts. I didn't call it `cat`
like `hg cat` because I haven't found `hg cat` on multiple files
useful.
2022-04-06 23:31:28 -07:00
dependabot[bot]
243836ebf3 github: bump github/codeql-action from 2.1.6 to 2.1.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](28eead2408...0182a2c78c)

---
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-04-06 09:46:28 -07:00
Yuya Nishihara
46d96c5a9e cli: extract function that maps settings and command options to diff format
This removes the ui dependency from show_diff(), and clarifies that the
formatter argument is the output stream.

We might eventually trun DiffFormat into a struct, but it's an enum for
now.
2022-04-06 09:46:14 -07:00
Yuya Nishihara
0003c36dfc cli: rename DiffFormat struct to DiffFormatArgs
This avoids future name conflicts. I want to extract the Format enum from
show_diff().
2022-04-06 09:46:14 -07:00
Yuya Nishihara
cff611b481 cli: move Ui::format_file_path() to WorkspaceCommandHelper
With this change, we can eliminate (some of) the ui argument from diff
functions.

parse_file_path() can also be moved to WorkspaceCommandHelper, but I'm
yet to be sure how to reorganize it and matcher builder.
2022-04-06 09:46:14 -07:00