-
Notifications
You must be signed in to change notification settings - Fork 228
Fix PullMerge() failure #8285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
khanaffan
wants to merge
9
commits into
master
Choose a base branch
from
affank/fix-pullmerge
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+151
−0
Open
Fix PullMerge() failure #8285
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
93203d7
Add exportAsJson method to SqliteChangesetReader and implement ApplyC…
khanaffan 879f8e5
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into a…
khanaffan 40d22ab
Add changeset for fixing pullMerge() failure in @itwin/core-backend
khanaffan d339e4c
Update common/changes/@itwin/core-backend/affank-fix-pullmerge_2025-0…
khanaffan d5507d4
Update core/backend/src/SqliteChangesetReader.ts
khanaffan 8d21fe9
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into a…
khanaffan a90c47c
Merge branch 'master' into affank/fix-pullmerge
khanaffan 7f64e04
fix lint error
khanaffan b1976a5
remove logger
khanaffan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@itwin/core-backend/affank-fix-pullmerge_2025-06-27-11-56.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@itwin/core-backend", | ||
"comment": "Fix issue related to pullMerge() failure", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@itwin/core-backend" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as chai from "chai"; | ||
import * as chaiAsPromised from "chai-as-promised"; | ||
import { HubWrappers, KnownTestLocations } from ".."; | ||
import { ChannelControl, IModelHost } from "../../core-backend"; | ||
import { HubMock } from "../../internal/HubMock"; | ||
import { Suite } from "mocha"; | ||
chai.use(chaiAsPromised); | ||
|
||
describe("apply changesets", function (this: Suite) { | ||
before(async () => { | ||
await IModelHost.startup(); | ||
}); | ||
it("Apply changeset with no local changes, should not create new local changes", async () => { | ||
HubMock.startup("PullMergeMethod", KnownTestLocations.outputDir); | ||
|
||
const iModelId = await HubMock.createNewIModel({ accessToken: "user1", iTwinId: HubMock.iTwinId, iModelName: "Test", description: "TestSubject" }); | ||
|
||
const b1 = await HubWrappers.downloadAndOpenBriefcase({ accessToken: "user1", iTwinId: HubMock.iTwinId, iModelId, noLock: true }); | ||
b1.channels.addAllowedChannel(ChannelControl.sharedChannelName); | ||
b1.saveChanges(); | ||
const b2 = await HubWrappers.downloadAndOpenBriefcase({ accessToken: "user2", iTwinId: HubMock.iTwinId, iModelId, noLock: true }); | ||
b2.channels.addAllowedChannel(ChannelControl.sharedChannelName); | ||
b2.saveChanges(); | ||
|
||
const schema = `<?xml version="1.0" encoding="UTF-8"?> | ||
<ECSchema schemaName="TestDomain" alias="ts" version="01.00" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.1"> | ||
<ECSchemaReference name="BisCore" version="01.00" alias="bis"/> | ||
<ECEntityClass typeName="Test2dElement"> | ||
<BaseClass>bis:GraphicalElement2d</BaseClass> | ||
<ECProperty propertyName="s" typeName="string"/> | ||
</ECEntityClass> | ||
<ECEntityClass typeName="Test3dElement"> | ||
<BaseClass>Test2dElement</BaseClass> | ||
<ECProperty propertyName="k" typeName="string"/> | ||
</ECEntityClass> | ||
</ECSchema>`; | ||
|
||
await b1.importSchemaStrings([schema]); | ||
b1.saveChanges("b1"); | ||
await b1.pushChanges({ description: "b1" }); | ||
await b2.pullChanges(); | ||
chai.expect(b2.txns.hasPendingTxns).to.be.false; | ||
|
||
b1.close(); | ||
b2.close(); | ||
|
||
HubMock.shutdown(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test starts Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.