Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
bb3ee61c
Commit
bb3ee61c
authored
10 years ago
by
Matt Harbison
Browse files
Options
Downloads
Patches
Plain Diff
largefiles: don't print files as both large and normal in addremove dryruns
parent
6b1428e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hgext/largefiles/overrides.py
+8
-4
8 additions, 4 deletions
hgext/largefiles/overrides.py
tests/test-largefiles-misc.t
+0
-2
0 additions, 2 deletions
tests/test-largefiles-misc.t
with
8 additions
and
6 deletions
hgext/largefiles/overrides.py
+
8
−
4
View file @
bb3ee61c
...
...
@@ -34,6 +34,10 @@
m
.
matchfn
=
lambda
f
:
lfile
(
f
)
and
origmatchfn
(
f
)
return
m
def
composenormalfilematcher
(
match
,
manifest
):
def
composenormalfilematcher
(
match
,
manifest
,
exclude
=
None
):
excluded
=
set
()
if
exclude
is
not
None
:
excluded
.
update
(
exclude
)
m
=
copy
.
copy
(
match
)
notlfile
=
lambda
f
:
not
(
lfutil
.
isstandin
(
f
)
or
lfutil
.
standin
(
f
)
in
...
...
@@ -38,6 +42,6 @@
m
=
copy
.
copy
(
match
)
notlfile
=
lambda
f
:
not
(
lfutil
.
isstandin
(
f
)
or
lfutil
.
standin
(
f
)
in
manifest
)
manifest
or
f
in
excluded
)
m
.
_files
=
filter
(
notlfile
,
m
.
_files
)
m
.
_fmap
=
set
(
m
.
_files
)
m
.
_always
=
False
...
...
@@ -1132,7 +1136,7 @@
removelargefiles
(
repo
.
ui
,
repo
,
True
,
m
,
**
opts
)
# Call into the normal add code, and any files that *should* be added as
# largefiles will be
addlargefiles
(
repo
.
ui
,
repo
,
True
,
matcher
,
**
opts
)
added
,
bad
=
addlargefiles
(
repo
.
ui
,
repo
,
True
,
matcher
,
**
opts
)
# Now that we've handled largefiles, hand off to the original addremove
# function to take care of the rest. Make sure it doesn't do anything with
# largefiles by passing a matcher that will ignore them.
...
...
@@ -1136,7 +1140,7 @@
# Now that we've handled largefiles, hand off to the original addremove
# function to take care of the rest. Make sure it doesn't do anything with
# largefiles by passing a matcher that will ignore them.
matcher
=
composenormalfilematcher
(
matcher
,
repo
[
None
].
manifest
())
matcher
=
composenormalfilematcher
(
matcher
,
repo
[
None
].
manifest
()
,
added
)
return
orig
(
repo
,
matcher
,
prefix
,
opts
,
dry_run
,
similarity
)
# Calling purge with --all will cause the largefiles to be deleted.
...
...
This diff is collapsed.
Click to expand it.
tests/test-largefiles-misc.t
+
0
−
2
View file @
bb3ee61c
...
...
@@ -262,7 +262,6 @@
removing
subrepo
/
large
.
txt
adding
subrepo
/
normal
.
txt
adding
subrepo
/
renamed
-
large
.
txt
adding
large
.
dat
$
hg
status
-
S
!
subrepo
/
large
.
txt
?
large
.
dat
...
...
@@ -295,7 +294,6 @@
removing
subrepo
/
large
.
txt
adding
subrepo
/
normal
.
txt
adding
subrepo
/
renamed
-
large
.
txt
adding
large
.
dat
$
cd
statusmatch
$
mv
subrepo
/renamed-large.txt subrepo/la
rge
.
txt
...
...
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