Commit Graph

1350 Commits

Author SHA1 Message Date
Caleb Owens
82b58b6875 Make edit mode fantastic 2024-10-09 15:27:20 +02:00
Kiril Videlov
87a4c61b9f Consistent setting of stack head updating the series 2024-10-08 22:25:19 +02:00
Kiril Videlov
915acd6afb Fixes a bug when validating stack target commit 2024-10-08 22:24:34 +02:00
Kiril Videlov
34ca1f4a65 Merge master into refactor Branch and Stack 2024-10-08 19:40:17 +02:00
Kiril Videlov
cfafc8d7b5 Make all places that create Stack also initialize it 2024-10-08 16:43:42 +02:00
Kiril Videlov
48bbe13d56 Rename StackExt.new to create 2024-10-08 16:37:07 +02:00
Kiril Videlov
570c974544 Rename StackActions to StackExt
Closer to rust conventions
2024-10-08 16:32:18 +02:00
Kiril Videlov
f172855c61 Adds a new method to StackActions 2024-10-08 16:12:21 +02:00
Kiril Videlov
ce9b136185 Rename Stack constructor function to new_uninitialized
This describes it more accurately
2024-10-08 16:05:23 +02:00
Kiril Videlov
f6d8bbc663 remove unused type 2024-10-08 16:03:22 +02:00
Kiril Videlov
d05d962cf8 Rename Branch to Stack 2024-10-08 15:59:27 +02:00
Caleb Owens
99145f4aa4 Redo branch upstream integration 2024-10-08 15:49:58 +02:00
Kiril Videlov
9e9f3255a8 Remove some types out of the stack crate
Seems i can get away without adding it
2024-10-08 15:44:59 +02:00
Kiril Videlov
7ec59f8489 extract the Branch types to crate gitbutler-stack 2024-10-08 15:27:16 +02:00
Kiril Videlov
d78ebbe176 rename crate gitbutler-stack to gitbutler-stack-api
This is needed to free up the name gitbutler-stack
2024-10-08 14:53:23 +02:00
Kiril Videlov
5b7109e8ee refactor(Branch): implement set_head() and make field private
This allows us to control the head setting and update the stack `heads` field accordingly
2024-10-08 12:21:57 +02:00
Kiril Videlov
cb2c0d458e refactor(Branch): implement a head() method
Moving the access to head behind a method so that we can eventually migrate to the `heads` field
2024-10-08 12:23:38 +02:00
Caleb Owens
8f9fd0cbe7 Extract branch_upstream_integration into it's own file 2024-10-07 18:02:21 +02:00
Caleb Owens
45fbb1af76 Remove old update_base_branch code 2024-10-07 17:46:28 +02:00
Caleb Owens
531672876f Remove edit mode flag from backend 2024-10-07 17:08:32 +02:00
Caleb Owens
f47fdd703b Introduce merge_base_octopussy 2024-10-02 14:59:11 +02:00
Caleb Owens
3f37e5aaf9 Use random names in commit_tree testing utility 2024-10-02 14:55:33 +02:00
Caleb Owens
2cb1358ac0 Use common primatives, and make sure conflicted trees are handled correctly 2024-10-07 16:51:24 +02:00
Caleb Owens
82406810f0 Extract tree updating into its own tested function 2024-10-07 16:10:34 +02:00
Caleb Owens
8c01244925 Fix upstream integration when there are no new branches
This is important as it will otherwise look like you've got the inverse diff in your uncommited changes.
2024-10-07 11:01:30 +02:00
Kiril Videlov
2b45293aee Stacking: fix upstream handling
- Correctly detect commits that have been pushed
- Return the list of upstream only commits on the list_virtual_branches response
2024-10-04 16:50:15 -07:00
estib
265d957fb3 Base branch: Use graph ahead behind 2024-10-04 18:28:27 +02:00
estib
d8b2bee18c fix: Lint errors 2024-10-04 10:35:17 +02:00
estib
adf33ac445 Upstream integration: Add some tests related to divergence resolution
Add tests regarding resolving divergence of the base branch with upstream
2024-09-30 16:26:19 +02:00
estib
9834627a20 Base: Propagate the conflicting status to the commits 2024-09-25 14:34:10 +02:00
estib
1368d87ed0 Base branch divergence resolution
Allow the user to choose how to resolve the base-branch divergence
2024-09-25 14:05:04 +02:00
estib
2091025227 Resolve upstream integration
Add a method to determine which should be the new base branch target commit ID based on what resolution approach is selected
2024-09-24 17:16:26 +02:00
estib
9060a4287c Ability to push the base branch
If needed, the base branch can be pushed or force pushed
2024-09-24 14:06:05 +02:00
estib
3a2cf73bcd BaseBranch: Determine whether the base diverged
Determine whether the local target has diverged from the remote,
and return some information about that
2024-09-24 13:57:22 +02:00
Esteban Vega
4d419a5001
Merge pull request #5016 from gitbutlerapp/add-tests-for-moving-commits
Factor out the `move_commit` function
2024-10-04 18:34:56 +02:00
Kiril Videlov
d262b230a8
Merge pull request #5036 from gitbutlerapp/add-series-top-base-implementation
Stacking - fixes an issue where its not possible to create additional series for the base of the stack
2024-10-04 00:29:26 +02:00
Kiril Videlov
d15e41ee73 Stacking - fixes an issue where its not possible to create additional series for the base of the stack 2024-10-03 15:22:20 -07:00
Kiril Videlov
eb88ed01c6 Stack api: Dont try to push series that are pointing to the Stack base 2024-10-03 20:52:27 +02:00
Kiril Videlov
ef1c7c139d Simplify CreateSeriesRequest
If `preceding_head` is provided, only the name of the series is sufficient
2024-10-03 20:12:49 +02:00
Kiril Videlov
efa5cbc7fd Makes it easier to create new series to the top of the stack
Adds an extra convinience API that does not require knowledge of what is the latest commit
2024-10-03 20:04:20 +02:00
Kiril Videlov
7ab8fdf0b8
Merge pull request #5031 from gitbutlerapp/series-on-list-virtual-branches-order
Fixes the order of series on the UI API (list_virtual_branches)
2024-10-03 18:56:36 +02:00
Kiril Videlov
cd4ec147b1 Fixes the order of series on the UI API (list_virtual_branches)
The UI needs the list starting with newest first.
Updated docs.
2024-10-03 18:50:56 +02:00
Kiril Videlov
e63e876ca5 Refactor - removes the change_refernce module that what the initial imlementation of stacking
This is now replaced with the more capable and correct `Stack` trait, implemented on `Branch`.

The new endpoints are:
create_series,
remove_series,
update_series_name,
update_series_description,
push_stack,
2024-10-03 18:39:50 +02:00
Kiril Videlov
3fc1687f86
Merge pull request #5027 from gitbutlerapp/reverse-patches-in-stack-series 2024-10-03 07:22:34 +02:00
Kiril Videlov
9c9c0fe5aa fix: list_virtual_branches series patch order should be newest to oldest 2024-10-03 06:16:03 +02:00
Kiril Videlov
d8c00133aa fix: Replace log range with merge base in Stack trait 2024-10-03 06:01:35 +02:00
dependabot[bot]
69752599be
Bump the rust-updates group across 1 directory with 13 updates
Bumps the rust-updates group with 13 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde) | `1.0.209` | `1.0.210` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.63` | `1.0.64` |
| [backtrace](https://github.com/rust-lang/backtrace-rs) | `0.3.73` | `0.3.74` |
| [once_cell](https://github.com/matklad/once_cell) | `1.19.0` | `1.20.1` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.7` | `0.12.8` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.127` | `1.0.128` |
| [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions) | `1.4.0` | `1.4.1` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.12.0` | `3.13.0` |
| [tauri-build](https://github.com/tauri-apps/tauri) | `1.5.4` | `1.5.5` |
| [tokio-util](https://github.com/tokio-rs/tokio) | `0.7.11` | `0.7.12` |
| [rstest](https://github.com/la10736/rstest) | `0.22.0` | `0.23.0` |
| [clap](https://github.com/clap-rs/clap) | `4.5.16` | `4.5.19` |
| [regex](https://github.com/rust-lang/regex) | `1.10.6` | `1.11.0` |



Updates `serde` from 1.0.209 to 1.0.210
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210)

Updates `thiserror` from 1.0.63 to 1.0.64
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.63...1.0.64)

Updates `backtrace` from 0.3.73 to 0.3.74
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.73...0.3.74)

Updates `once_cell` from 1.19.0 to 1.20.1
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.1)

Updates `reqwest` from 0.12.7 to 0.12.8
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.7...v0.12.8)

Updates `serde_json` from 1.0.127 to 1.0.128
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/1.0.127...1.0.128)

Updates `pretty_assertions` from 1.4.0 to 1.4.1
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases)
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.4.0...v1.4.1)

Updates `tempfile` from 3.12.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0)

Updates `tauri-build` from 1.5.4 to 1.5.5
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-build-v1.5.4...tauri-build-v1.5.5)

Updates `tokio-util` from 0.7.11 to 0.7.12
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.11...tokio-util-0.7.12)

Updates `rstest` from 0.22.0 to 0.23.0
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.22.0...v0.23.0)

Updates `clap` from 4.5.16 to 4.5.19
- [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.5.16...clap_complete-v4.5.19)

Updates `regex` from 1.10.6 to 1.11.0
- [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.10.6...1.11.0)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: backtrace
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: tauri-build
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-02 22:37:53 +00:00
Kiril Videlov
ef91acc71a Fixes an issue initializing stacks 2024-10-03 00:17:58 +02:00
Kiril Videlov
e00f47aea5 list_virtual_branches now includes the series data
at this point only local patches are returned
2024-10-02 23:49:58 +02:00
Kiril Videlov
99e48e4f3e Initialize the Stack heads for branches during get_applied_status 2024-10-02 22:25:44 +02:00