##// END OF EJS Templates
subrepo: don't exclude files in .hgignore when adding to git...
Matt Harbison -
r24182:00ef3edc default
parent child Browse files
Show More
@@ -1526,14 +1526,15 b' class gitsubrepo(abstractsubrepo):'
1526 def add(self, ui, match, prefix, explicitonly, **opts):
1526 def add(self, ui, match, prefix, explicitonly, **opts):
1527 if self._gitmissing():
1527 if self._gitmissing():
1528 return []
1528 return []
1529 if match.files():
1529
1530 files = match.files()
1530 (modified, added, removed,
1531 else:
1531 deleted, unknown, ignored, clean) = self.status(None)
1532 (modified, added, removed,
1533 deleted, unknown, ignored, clean) = self.status(None)
1534 files = unknown
1535
1532
1536 files = [f for f in files if match(f)]
1533 # Unknown files not of interest will be rejected by the matcher
1534 files = unknown
1535 files.extend(match.files())
1536
1537 files = [f for f in sorted(set(files)) if match(f)]
1537 for f in files:
1538 for f in files:
1538 exact = match.exact(f)
1539 exact = match.exact(f)
1539 command = ["add"]
1540 command = ["add"]
@@ -922,11 +922,11 b' make sure everything is reverted correct'
922 > *.python
922 > *.python
923 > EOF
923 > EOF
924 $ hg add .hgignore
924 $ hg add .hgignore
925 $ hg add --subrepos "glob:**.python"
925 $ hg add --subrepos "glob:**.python" s/barfoo
926 adding s/snake.python (glob)
926 adding s/snake.python (glob)
927 $ hg st --subrepos s
927 $ hg st --subrepos s
928 A s/barfoo
928 A s/snake.python
929 A s/snake.python
929 ? s/barfoo
930 ? s/c.c
930 ? s/c.c
931 ? s/cpp.cpp
931 ? s/cpp.cpp
932 ? s/foobar.orig
932 ? s/foobar.orig
General Comments 0
You need to be logged in to leave comments. Login now