Push after commit does not push modified sub-repos
Created originally on Bitbucket by TaronM (Taron Millet)
This is using TortoiseHg version 4.0.1. I used the following steps to reproduce this:
-
Created 2 empty repositories on BitBucket - TestMainRepo and TestSubRepo
-
Created 2 empty folders on my local hard drive, TestMainRepo and TestSubRepo.
-
Added .hg/hgrc file to TestMainRepo with the following contents:
[paths]
default = ssh://hg@bitbucket.org/CVStudios/TestMainRepo
[tortoisehg]
postpull = update
autoresolve = True
cipushafter = default
recurseinsubrepos = True
[web]
name = TestMainRepo
- Added a .hg/hgrc file to TestSubRepo with the following contents:
[paths]
default = ssh://hg@bitbucket.org/CVStudios/TestSubRepo
[tortoisehg]
postpull = update
autoresolve = True
cipushafter = default
[web]
name = TestSubRepo
- Added a .hgsub file to TestMainRepo with the following contents:
TestSubRepo = TestSubRepo
[subpaths]
bitbucket\.org/CVStudios/(.*)/(.*) = bitbucket.org/CVStudios/\2
-
Added a simple .txt file to each repo.
-
Commited (which automatically pushed) TestSubRepo by itself.
-
Commited (which automatically pushed) TestMainRepo, which also added .hgsubstate for me.
-
Confirmed all was correct in BitBucket and could clone TestMainRepo to another folder on my hard drive without any problems, and TestSubRepo came with it.
-
Modified the .txt file in BOTH TestMainRepo and TestSubRepo, and made sure they were marked as modified files.
-
Opened JUST TestMainRepo in TortoiseHg Workbench, wrote commit message, clicked Commit. Got the following output:
% hg commit --verbose "--message=Second Commit" --user "Taron <my_e-mail>" --subrepos -- TestSubRepo TestMainRepoFile.txt
committing subrepository TestSubRepo
committing files:
TestSubRepoFile.txt
committing manifest
committing changelog
committing files:
.hgsubstate
TestMainRepoFile.txt
committing manifest
committing changelog
committed changeset 1:c2d3ecb7f7de
[command completed successfully Fri Jan 06 19:00:10 2017]
% hg push default
pushing to ssh://hg@bitbucket.org/CVStudios/TestMainRepo
no changes made to subrepo TestSubRepo since last push to ssh://hg@bitbucket.org/CVStudios/TestSubRepo
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 2 changes to 2 files
[command completed successfully Fri Jan 06 19:00:20 2017]
TestMainRepo%
- Checked BitBucket - TestMainRepo is updated, but TestSubRepo is not - it only has the initial commit, not the second one. However, on my local machine, both TestMainRepo and TestSubRepo are updated properly.
I now need to manually push TestSubRepo. If I don't, and try to pull TestMainRepo to another folder, I get this:
TestMainRepo% % hg pull --verbose --update --config ui.merge=internal:merge ssh://hg@bitbucket.org/CVStudios/TestMainRepo
pulling from ssh://hg@bitbucket.org/CVStudios/TestMainRepo
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 5 changes to 3 files
resolving manifests
getting .hgsub
getting .hgsubstate
getting TestMainRepoFile.txt
cloning subrepo TestSubRepo from ssh://hg@bitbucket.org/CVStudios/TestSubRepo
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
unknown revision '5b2da1ce208064c2b73c3e561d3451c7bc8e568f'