Mercurial > hg
view tests/test-amend-subrepo.t @ 37811:51dee6fad783 stable
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 23 Apr 2018 23:22:52 -0400 |
parents | 4441705b7111 |
children | 4ea21df312ec |
line wrap: on
line source
#testcases obsstore-off obsstore-on $ cat << EOF >> $HGRCPATH > [extensions] > amend = > EOF #if obsstore-on $ cat << EOF >> $HGRCPATH > [experimental] > evolution.createmarkers = True > EOF #endif Prepare parent repo ------------------- $ hg init r $ cd r $ echo a > a $ hg ci -Am0 adding a Link first subrepo ------------------ $ echo 's = s' >> .hgsub $ hg add .hgsub $ hg init s amend without .hgsub $ hg amend s abort: can't commit subrepos without .hgsub [255] amend with subrepo $ hg amend saved backup bundle to * (glob) (obsstore-off !) $ hg status --change . A .hgsub A .hgsubstate A a $ cat .hgsubstate 0000000000000000000000000000000000000000 s Update subrepo -------------- add new commit to be amended $ echo a >> a $ hg ci -m1 amend with dirty subrepo $ echo a >> s/a $ hg add -R s adding s/a $ hg amend abort: uncommitted changes in subrepository "s" (use --subrepos for recursive commit) [255] amend with modified subrepo $ hg ci -R s -m0 $ hg amend saved backup bundle to * (glob) (obsstore-off !) $ hg status --change . M .hgsubstate M a $ cat .hgsubstate f7b1eb17ad24730a1651fccd46c43826d1bbc2ac s revert subrepo change $ hg up -R s -q null $ hg amend saved backup bundle to * (glob) (obsstore-off !) $ hg status --change . M a Link another subrepo -------------------- add new commit to be amended $ echo b >> b $ hg ci -qAm2 also checks if non-subrepo change is included $ echo a >> a amend with another subrepo $ hg init t $ echo b >> t/b $ hg ci -R t -Am0 adding b $ echo 't = t' >> .hgsub $ hg amend saved backup bundle to * (glob) (obsstore-off !) $ hg status --change . M .hgsub M .hgsubstate M a A b $ cat .hgsubstate 0000000000000000000000000000000000000000 s bfb1a4fb358498a9533dabf4f2043d94162f1fcd t Unlink one subrepo ------------------ add new commit to be amended $ echo a >> a $ hg ci -m3 amend with one subrepo dropped $ echo 't = t' > .hgsub $ hg amend saved backup bundle to * (glob) (obsstore-off !) $ hg status --change . M .hgsub M .hgsubstate M a $ cat .hgsubstate bfb1a4fb358498a9533dabf4f2043d94162f1fcd t Unlink subrepos completely -------------------------- add new commit to be amended $ echo a >> a $ hg ci -m3 amend with .hgsub removed $ hg rm .hgsub $ hg amend saved backup bundle to * (glob) (obsstore-off !) $ hg status --change . M a R .hgsub R .hgsubstate $ cd ..