Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F447820
20160110.repo.02.slug.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
20160110.repo.02.slug.php
View Options
<?php
$table
=
new
PhabricatorRepository
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$repository
)
{
$slug
=
$repository
->
getRepositorySlug
();
if
(
$slug
!==
null
)
{
continue
;
}
$clone_name
=
$repository
->
getDetail
(
'clone-name'
);
if
(!
strlen
(
$clone_name
))
{
continue
;
}
if
(!
PhabricatorRepository
::
isValidRepositorySlug
(
$clone_name
))
{
echo
tsprintf
(
"%s
\n
"
,
pht
(
'Repository "%s" has a "Clone/Checkout As" name which is no longer '
.
'valid ("%s"). You can edit the repository to give it a new, valid '
.
'short name.'
,
$repository
->
getDisplayName
(),
$clone_name
));
continue
;
}
try
{
queryfx
(
$conn_w
,
'UPDATE %T SET repositorySlug = %s WHERE id = %d'
,
$table
->
getTableName
(),
$clone_name
,
$repository
->
getID
());
}
catch
(
AphrontDuplicateKeyQueryException
$ex
)
{
echo
tsprintf
(
"%s
\n
"
,
pht
(
'Repository "%s" has a duplicate "Clone/Checkout As" name ("%s"). '
.
'Each name must now be unique. You can edit the repository to give '
.
'it a new, unique short name.'
,
$repository
->
getDisplayName
(),
$clone_name
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 5:30 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
66672
Default Alt Text
20160110.repo.02.slug.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment