Commit Graph

510 Commits

Author SHA1 Message Date
Scott Chacon
3392ca0b97
tree writing fixes (#586)
Tree writing (for commits and unapply vbranch stashing) now is tested and works properly for new and removed files as well as hunk level modifications per branch.
2023-07-02 15:48:44 +02:00
Scott Chacon
0806e94e6f
Fix some vbranch things (#584)
* add partial test, return branch id
* tests pass now. dont assign hunks if the branch isnt active
2023-07-02 12:35:50 +02:00
Scott Chacon
e6937368a7
Fix remote listing (#573)
* fix remote listing
* dont show commit stuff unless there is something to commit
* filter remote branches
* can create a virtual branch from a remote branch
* show remote/local a little differently
2023-07-01 14:17:32 +02:00
Kiril Videlov
4bdaaacf3e add support for deleting vbrahcnes 2023-07-01 12:10:56 +02:00
Scott Chacon
a2a30d05a8
Sc fix remote listing2 (#574)
* fix remote listing
* dont show commit stuff unless there is something to commit
2023-07-01 08:54:17 +02:00
Kiril Videlov
d95cbdb738 fetch after push 2023-06-30 17:34:24 +02:00
Kiril Videlov
488f7862f5 remove unused parameter 2023-06-30 17:34:24 +02:00
Kiril Videlov
f9bc13685a remove target extraction from vbranch, use origin 2023-06-30 17:34:24 +02:00
Kiril Videlov
2c965e8a47 push head directly 2023-06-30 17:34:24 +02:00
Kiril Videlov
5fb2ef580e update upstream 2023-06-30 17:34:24 +02:00
Kiril Videlov
07c4d53078 persisting upstream branch on vbranch upon push 2023-06-30 17:34:24 +02:00
Scott Chacon
a4114185d2
set a remote flag on commits that have been pushed (#568) 2023-06-30 16:50:15 +02:00
Nikita Galaiko
297e0cddc9 new virtual branch button works 2023-06-30 16:00:54 +02:00
Scott Chacon
f8be69575f
Some Docs (#565)
* document these structs
2023-06-30 15:36:40 +02:00
Nikita Galaiko
f2024dc578 bubble up hunks that change size 2023-06-30 15:32:28 +02:00
Nikita Galaiko
183940072d fix tests 2023-06-30 14:30:52 +02:00
Nikita Galaiko
13ef7435b4 bubble new hunks and files up 2023-06-30 14:15:12 +02:00
Nikita Galaiko
b3cc802f1a explicitly move and always update hunks 2023-06-30 14:15:12 +02:00
Scott Chacon
8cc1d7b3f5
Merge status (#554)
* show merge status of virtual branches
* add merge conflict list and tests and fix uncommitted work
2023-06-30 11:27:54 +02:00
Kiril Videlov
c090837b17 use default target 2023-06-30 11:23:49 +02:00
Kiril Videlov
e0006dbf43 formatting 2023-06-30 11:23:49 +02:00
Kiril Videlov
4092554bdf Pushing of vBranches 2023-06-30 11:23:49 +02:00
Nikita Galaiko
1df31ec1ee rm move_files 2023-06-30 09:13:22 +02:00
Nikita Galaiko
fd7d2f9d87 remove selected branch id 2023-06-30 08:11:23 +02:00
Nikita Galaiko
ace5b8468f store branch order 2023-06-30 08:11:23 +02:00
Nikita Galaiko
785013d611 create branch with ownership 2023-06-30 08:11:23 +02:00
Nikita Galaiko
b7c9940eb3 rm move_files api 2023-06-30 08:11:23 +02:00
Nikita Galaiko
47fc2924ab fix clippy warnings 2023-06-29 11:47:23 +02:00
Nikita Galaiko
df935248c0 support updating branch ownership 2023-06-29 11:33:20 +02:00
Nikita Galaiko
87476939a8 make branch ownerhip order matter 2023-06-29 11:33:20 +02:00
Scott Chacon
4480f690fe
add placeholder for push, fix checkout (#548) 2023-06-29 08:59:41 +02:00
Scott Chacon
4a0bcb8665
Apply and Unapply Virtual Branches (#544)
* apply and unapply branches
* show unapplied branches in vbranch list
* pick random branch if selected isnt applied
2023-06-29 07:48:48 +02:00
Nikita Galaiko
cac92dd027 sort new hunks as they come in 2023-06-28 16:55:04 +02:00
Nikita Galaiko
8cbef59988 rm hunk timestamps 2023-06-28 13:19:50 +02:00
Nikita Galaiko
511c5b6124 more tests for moving hunks 2023-06-28 13:19:50 +02:00
Nikita Galaiko
4dd70ee5b1 refactor ownership types 2023-06-28 13:19:50 +02:00
Nikita Galaiko
201e666fe3 store timstamp in a hunk 2023-06-28 13:19:50 +02:00
Scott Chacon
045ddbf16e
Delete (unapply) branch when it's integrated upstream (#515)
* delete (unapply branch when the head matches the merge result)
* add debug stuff, create new branch if none applied
* if there are modified files on a vbranch, dont unapply it
* fix args in the wrong order
2023-06-28 12:40:10 +02:00
Nikita Galaiko
daad336602 separate hunks type 2023-06-27 12:28:08 +02:00
Nikita Galaiko
5553659849 check session/meta when asserting session existance 2023-06-27 11:50:35 +02:00
Nikita Galaiko
c30623f15a detect changed hunks 2023-06-27 10:33:35 +02:00
Nikita Galaiko
9b5e6eec2b protect vbranches with a semaphore 2023-06-26 12:29:50 +02:00
Nikita Galaiko
77c00a0723 fix warnings 2023-06-26 08:59:28 +02:00
Scott Chacon
a090263b95
Update a branch name (#514)
Way to update a branch name
2023-06-25 13:01:15 +02:00
Scott Chacon
619384405f
Update Target Branch (#510)
This PR implements a way to update an out of date target branch.

This adds logic to see if the target branch is out of date (if say, origin/master has commits that are not on target.sha) and will show in the UI that the frozen target branch is behind. If this happens, it adds a button to update, which will call an update_branch_target function in Rust.

This function will:

* Check that there is in fact a new commit on the target branch
* Try to merge that new head commit into your current working directory, bailing if it cannot
* If that succeeds (the new upstream can merge cleanly with all your vbranch content), it will then update all your virtual branches
* If the vbranch has no commits, it simply updates the head so the diffs work properly again
* If the vbranch has commits, it will merge the new head into the virtual branch head and write the new merge commit to the vbranch commit list. omg.

The patch also:
* Adds some tests for updating the target
* Calculates merge base on setup
* Only assigns stuff to active branches
* Adds a reset command to make all branches inactive for testing
2023-06-24 21:09:03 -07:00
Scott Chacon
e46f3be1a4
Virtual Commits (#507)
* add virtual commits to vbranches, return and render them
* remove file changes from status
2023-06-24 05:07:16 -07:00
Nikita Galaiko
fe44d9ae30 fix old way of moving 2023-06-22 15:37:20 +02:00
Nikita Galaiko
c3248bfee4 assert file format 2023-06-22 15:37:20 +02:00
Nikita Galaiko
b49031b2f2 avoid flakiness 2023-06-22 14:16:44 +02:00
Nikita Galaiko
0b00d67e8f cargo fmt 2023-06-22 14:16:44 +02:00