Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hg
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
hg
Commits
91a3c58ecf93
Commit
91a3c58ecf93
authored
8 years ago
by
Gábor Stefanik
Browse files
Options
Downloads
Patches
Plain Diff
copies: mark checkcopies as internal with the _ prefix
parent
d13a7c8bf0a5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mercurial/copies.py
+8
-8
8 additions, 8 deletions
mercurial/copies.py
with
8 additions
and
8 deletions
mercurial/copies.py
+
8
−
8
View file @
91a3c58e
...
...
@@ -251,6 +251,6 @@
return
u1
,
u2
def
_makegetfctx
(
ctx
):
"""
return a
'
getfctx
'
function suitable for checkcopies usage
"""
return a
'
getfctx
'
function suitable for
_
checkcopies usage
We have to re-setup the function building
'
filectx
'
for each
...
...
@@ -255,6 +255,6 @@
We have to re-setup the function building
'
filectx
'
for each
'
checkcopies
'
to ensure the linkrev adjustment is properly setup for
'
_
checkcopies
'
to ensure the linkrev adjustment is properly setup for
each. Linkrev adjustment is important to avoid bug in rename
detection. Moreover, having a proper
'
_ancestrycontext
'
setup ensures
the performance impact of this adjustment is kept limited. Without it,
...
...
@@ -331,7 +331,7 @@
m2
=
c2
.
manifest
()
ma
=
ca
.
manifest
()
# see checkcopies documentation below for these dicts
# see
_
checkcopies documentation below for these dicts
copy1
,
copy2
=
{},
{}
movewithdir1
,
movewithdir2
=
{},
{}
fullcopy1
,
fullcopy2
=
{},
{}
...
...
@@ -345,6 +345,6 @@
bothnew
=
sorted
(
addedinm1
&
addedinm2
)
for
f
in
u1u
:
checkcopies
(
c1
,
f
,
m1
,
m2
,
ca
,
limit
,
diverge
,
copy1
,
fullcopy1
)
_
checkcopies
(
c1
,
f
,
m1
,
m2
,
ca
,
limit
,
diverge
,
copy1
,
fullcopy1
)
for
f
in
u2u
:
...
...
@@ -349,6 +349,6 @@
for
f
in
u2u
:
checkcopies
(
c2
,
f
,
m2
,
m1
,
ca
,
limit
,
diverge
,
copy2
,
fullcopy2
)
_
checkcopies
(
c2
,
f
,
m2
,
m1
,
ca
,
limit
,
diverge
,
copy2
,
fullcopy2
)
copy
=
dict
(
copy1
.
items
()
+
copy2
.
items
())
movewithdir
=
dict
(
movewithdir1
.
items
()
+
movewithdir2
.
items
())
...
...
@@ -373,8 +373,8 @@
%
"
\n
"
.
join
(
bothnew
))
bothdiverge
,
_copy
,
_fullcopy
=
{},
{},
{}
for
f
in
bothnew
:
checkcopies
(
c1
,
f
,
m1
,
m2
,
ca
,
limit
,
bothdiverge
,
_copy
,
_fullcopy
)
checkcopies
(
c2
,
f
,
m2
,
m1
,
ca
,
limit
,
bothdiverge
,
_copy
,
_fullcopy
)
_
checkcopies
(
c1
,
f
,
m1
,
m2
,
ca
,
limit
,
bothdiverge
,
_copy
,
_fullcopy
)
_
checkcopies
(
c2
,
f
,
m2
,
m1
,
ca
,
limit
,
bothdiverge
,
_copy
,
_fullcopy
)
for
of
,
fl
in
bothdiverge
.
items
():
if
len
(
fl
)
==
2
and
fl
[
0
]
==
fl
[
1
]:
copy
[
fl
[
0
]]
=
of
# not actually divergent, just matching renames
...
...
@@ -454,7 +454,7 @@
return
copy
,
movewithdir
,
diverge
,
renamedelete
def
checkcopies
(
ctx
,
f
,
m1
,
m2
,
ca
,
limit
,
diverge
,
copy
,
fullcopy
):
def
_
checkcopies
(
ctx
,
f
,
m1
,
m2
,
ca
,
limit
,
diverge
,
copy
,
fullcopy
):
"""
check possible copies of f from m1 to m2
...
...
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