Skip to content
Snippets Groups Projects
Commit 51dee6fa authored by Matt Harbison's avatar Matt Harbison
Browse files

infinitepush: ensure fileindex bookmarks use '/' separators (issue5840)

After loading up with status messages, I noticed that the subsequent matcher was
rejecting 'scratch\mybranch' on Windows.  No bookmarks were reported back, and
the tests subsequently failed.  I did a search for 'match', and nothing else
looks like it needs to be fixed up, but someone who understands this code should
also take a look.

I also tried setting `infinitepush.branchpattern=re:scratch\\.*` in
library-infinitepush.sh without this change, but that didn't work.  Still,
should we ban '\' in these bookmarks to avoid confusion?  I thought I saw code
that sandwiches a pattern between 're:^' and '.*', so perhaps regex characters
will need special care?

I also noticed comments in externalbundlestore.{read,write} that it won't work
on Windows because of opening an open file.  But I don't see a test failure, so
this may lack test coverage.
parent 856f381a
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,8 @@
import os
from mercurial import util
from mercurial.utils import stringutil
from . import indexapi
......@@ -82,6 +84,7 @@
for dirpath, _, books in self._repo.vfs.walk(self._bookmarkmap):
for book in books:
bookmark = os.path.join(dirpath, book)[prefixlen:]
bookmark = util.pconvert(bookmark)
if not matcher(bookmark):
continue
yield bookmark, self._read(os.path.join(dirpath, book))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment