0

I have got a new repository converted from SVN. I want to minimize this repository further by removing unintended files. For that I am again converting the mercurial repository to a new one by using hg convert and the filemap parameter. So my filemap looks like this:

include a
rename a .

The command I am using is:

hg convert --filemap fm.txt . ../new_repo

This ends after full conversion as I can see in the console output.

But if I now check the content of the directory new repo, I can see only .hg files in there.

I ran hg update -C within the directory whic gives me one more file .hgtags

Can anyone please suggest what has gone wrong?

Kallol
  • 302
  • 4
  • 16

2 Answers2

1

This answer was spot on: you don't actually create an empty directory, but a directory with a hidden .hg directory. If you run

hg update

in your target directory, you will have your target directory with all its contents as expected.

Community
  • 1
  • 1
Zoltán
  • 21,321
  • 14
  • 93
  • 134
0

In common, you done all correct (if directory a exist in source repo)

In my test for repository with directory lang, which I want to move into the root of new repo, I used filemap

include lang
rename lang .

identical to your filemap and got bare repository after converting (no files in Working Dir, only repository on .hg). Testing repository

hg log
changeset:   19:41e96453fa67
tag:         tip
...
changeset:   0:ba52ea5c5c1f

showed me all related hisory

hg up
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

(without -C) brings all files into the Working Directory

SR>dir /B
.hg
UTF-8
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • "hg up" on the working directory fetches me another file ".hgtags" having entries like: __b108468eca7d6522a911e1cafbcecae6d380bbd2 svn.3502__ – Kallol Jan 11 '14 at 19:33
  • I figured out, that the hg workbench has two branches: "Branches" which came from SVN and the "default". How can I remove "Branches" branch and get everything in "default" branch? – Kallol Jan 13 '14 at 13:31
  • @Kallol - you can't remove any branch in Mercurial. you can close "Branches" branch, or just ignore it and work in default only (`hg up default`, work and commit) – Lazy Badger Jan 16 '14 at 05:20