Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
evolve
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Mercurial
evolve
Commits
4a5488c01a66
Commit
4a5488c01a66
authored
12 years ago
by
Pierre-Yves David
Browse files
Options
Downloads
Patches
Plain Diff
obsolete: improve compat with new core dump%i scheme
parent
9dda5c1f6a45
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
hgext/obsolete.py
+10
-4
10 additions, 4 deletions
hgext/obsolete.py
with
10 additions
and
4 deletions
hgext/obsolete.py
+
10
−
4
View file @
4a5488c0
...
...
@@ -436,7 +436,9 @@
if
not
repo
.
obsstore
:
return
{}
data
=
repo
.
obsstore
.
_writemarkers
()
return
{
'
dump
'
:
base85
.
b85encode
(
data
)}
encdata
=
base85
.
b85encode
(
data
)
return
{
'
dump0
'
:
encdata
,
'
dump
'
:
encdata
}
# legacy compat
def
pushmarker
(
repo
,
key
,
old
,
new
):
"""
Push markers over pushkey
"""
...
...
@@ -1189,7 +1191,11 @@
result
=
opull
(
remote
,
*
args
,
**
kwargs
)
remoteobs
=
remote
.
listkeys
(
'
obsolete
'
)
if
'
dump
'
in
remoteobs
:
data
=
base85
.
b85decode
(
remoteobs
[
'
dump
'
])
remoteobs
[
'
dump0
'
]
=
remoteobs
.
pop
(
'
dump
'
)
if
'
dump0
'
in
remoteobs
:
for
key
,
values
in
remoteobs
.
iteritems
():
if
key
.
startswith
(
'
dump
'
):
data
=
base85
.
b85decode
(
remoteobs
[
'
dump0
'
])
self
.
obsstore
.
mergemarkers
(
data
)
self
.
_clearobsoletecache
()
self
.
_turn_extinct_secret
()
...
...
@@ -1211,7 +1217,7 @@
raise
if
'
obsolete
'
in
remote
.
listkeys
(
'
namespaces
'
)
and
self
.
obsstore
:
data
=
self
.
obsstore
.
_writemarkers
()
r
=
remote
.
pushkey
(
'
obsolete
'
,
'
dump
'
,
''
,
r
=
remote
.
pushkey
(
'
obsolete
'
,
'
dump
0
'
,
''
,
base85
.
b85encode
(
data
))
if
not
r
:
self
.
ui
.
warn
(
_
(
'
failed to push obsolete markers!
\n
'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment