Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tortoisehg and subrepos

I can't get Tortoisehg (1.0) to work with subrepos

I have a directory structure like this:

root
  .hg
  .hgsub
  .hgsubstate
  Customer1
    Project1
      .hg
      foo.txt
    Project2
      .hg
  Customer2
    Project3
      .hg

the .hgsub file under root looks like

Customer1\Project1=Customer1\Project1  
Customer1\Project2=Customer1\Project2  
Customer2\Project3=Customer2\Project3  

If modify the file Customer1\Project1\foo.txt and commit from the root it works

>hg ci -m "command line commit"
committing subrepository customer1\project1

in Tortoisehg customer1\project1 is displayed with status S (subrepo) but when commiting I get a message

abort: customer1/project1: no match under directory!

Is this scenario not supported or am I doing something wrong?

The doc says:
"TortoiseHg 1.0 introduced rudimentary support for subrepositories, and only in the commit / status tool. When Mercurial considers a subrepo as dirty, it will appear in the commit tool as a special entry in the file list with a status of S. If a subrepo is included in the file list of a commit, the subrepo is committed along with the other changes, updating the .hgsubstate file in the main repository root."

like image 883
adrianm Avatar asked Mar 20 '10 19:03

adrianm


People also ask

What is TortoiseHg used for?

TortoiseHg is a Windows shell extension and a series of applications for the Mercurial distributed revision control system that includes a Gnome/Nautilus extension and a CLI wrapper application to be able to used on non-Windows platforms.

What is a Subrepo?

Subrepositories is a feature that allows you to treat a collection of repositories as a group. This will allow you to clone, commit to, push, and pull projects and their associated libraries as a group.

How do you commit in TortoiseHg?

From the revision history viewer (TortoiseHg ‣ Workbench or thg log) open the context menu over the changeset which you want to merge and select Merge with local…. Finally, in the merge dialog, press Merge and then Commit.


1 Answers

Adding my 2 cents.

I was receiving this error abort: customer1/project1: no match under directory on Windows in the following scenario:

  • repo was in a folder named MyFolder (note the upper case)
  • repo had a subrepo
  • some files (only some!) in the parent repo were commited using myfolder/filename.ext (note the lowercase)

Everything works fine, commandline commits work fine, but Tortoise complains.

Rename the files (find the lowercase ones using hg status --all and you're fine)

like image 196
jazzcat Avatar answered Sep 21 '22 13:09

jazzcat