Page MenuHomePhabricator

D20047.id47872.diff
No OneTemporary

D20047.id47872.diff

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

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)

Event Timeline