Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
hg-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
hg-git
Commits
6faa5b0f
Commit
6faa5b0f
authored
11 years ago
by
durin42
Browse files
Options
Downloads
Patches
Plain Diff
gitignore: gate feature on dirstate having rootcache and ignore having readpats
parent
09028a1e
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hggit/__init__.py
+10
-4
10 additions, 4 deletions
hggit/__init__.py
tests/test-gitignore.t
+3
-0
3 additions, 0 deletions
tests/test-gitignore.t
with
13 additions
and
4 deletions
hggit/__init__.py
+
10
−
4
View file @
6faa5b0f
...
...
@@ -41,7 +41,7 @@
'
collections
'
,
])
import
gitrepo
,
hgrepo
,
gitdirstate
import
gitrepo
,
hgrepo
from
git_handler
import
GitHandler
testedwith
=
'
1.9.3 2.0.2 2.1.2 2.2.3 2.3.1
'
...
...
@@ -130,9 +130,15 @@
repo
.
ui
.
status
(
_
(
"
clearing out the git cache data
\n
"
))
git
=
GitHandler
(
repo
,
ui
)
git
.
clear
()
extensions
.
wrapfunction
(
ignore
,
'
ignore
'
,
gitdirstate
.
gignore
)
dirstate
.
dirstate
=
gitdirstate
.
gitdirstate
from
mercurial
import
dirstate
from
mercurial
import
ignore
if
(
getattr
(
dirstate
,
'
rootcache
'
,
False
)
and
getattr
(
ignore
,
'
readpats
'
,
False
)):
# only install our dirstate wrapper if it has a hope of working
import
gitdirstate
extensions
.
wrapfunction
(
ignore
,
'
ignore
'
,
gitdirstate
.
gignore
)
dirstate
.
dirstate
=
gitdirstate
.
gitdirstate
def
git_cleanup
(
ui
,
repo
):
new_map
=
[]
...
...
This diff is collapsed.
Click to expand it.
tests/test-gitignore.t
+
3
−
0
View file @
6faa5b0f
$
python
-
c
'
from mercurial.dirstate import rootcache
'
||
exit
80
$
python
-
c
'
from mercurial.ignore import readpats
'
||
exit
80
Load
commonly
used
test
logic
$
.
"
$TESTDIR
/testutil
"
...
...
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