Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15380598
D20047.id47872.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20047.id47872.diff
View Options
diff --git a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
--- a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
+++ b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
@@ -188,7 +188,7 @@
if ($this_version) {
$this_version = (int)$this_version->getRepositoryVersion();
} else {
- $this_version = -1;
+ $this_version = null;
}
if ($versions) {
@@ -197,7 +197,7 @@
// leader, we want to fetch from a leader and then update our version.
$max_version = (int)max(mpull($versions, 'getRepositoryVersion'));
- if ($max_version > $this_version) {
+ if (($this_version === null) || ($max_version > $this_version)) {
if ($repository->isHosted()) {
$fetchable = array();
foreach ($versions as $version) {
@@ -206,6 +206,7 @@
}
}
+
$this->synchronizeWorkingCopyFromDevices(
$fetchable,
$this_version,
@@ -445,10 +446,10 @@
if ($this_version) {
$this_version = (int)$this_version->getRepositoryVersion();
} else {
- $this_version = -1;
+ $this_version = null;
}
- if ($new_version > $this_version) {
+ if (($this_version === null) || ($new_version > $this_version)) {
PhabricatorRepositoryWorkingCopyVersion::updateVersion(
$repository_phid,
$device_phid,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 3:48 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7682341
Default Alt Text
D20047.id47872.diff (1 KB)
Attached To
Mode
D20047: Use "null", not "-1", as a local "no version" marker when performing intracluster repository sync
Attached
Detach File
Event Timeline
Log In to Comment