Why isn’t the addremove recommended by default in Mercurial?

This is perhaps a question of strategy more than anything else. I am new to version control and I guess I should count myself lucky to have relatively more mature systems like Mercurial and Git at my disposal as compared to the older systems.

I started with Hg because I read somewhere that it’s more Pythonlike in its approach. The few tutorials that I went through (examples and videos) consistently use the command hg add *. After using that command for some time now on my project, I have a long list of files which have ! in front of the files that have been deleted. I am speaking of the output of the command hg st of course.

I guess using hg addremove * will solve my problem. If that’s the case, why isn’t it the default command to teach Hg to a beginner? Is there a pitfall I am missing? Wouldn’t it be reasonable to assume that typically a person working on a folder would want the files which are deleted to visibly disappear from the output of hg st (esp. since they are stored in the repository by Hg anyways)?

hg add * is a terribly idea. The tutorials you’ve read/watched probably weren’t very good. Most repositories contain many files that you don’t want to put under version control: Generated artifacts, junk from experiments you did, and files that should be part of the repository but only later (i.e., are not ready to be committed). You don’t want to version control those. Unless they are only temporary, they should be listed in .hgignore so they won’t pollute the output of hg status with ?s and won’t be added accidentally. hg add and hg addremove already consider all files, except ignored ones, and hg add * and hg addremove * override this sane default. So it’s not only redundant, but also breaks a very useful feature.

You should only add the files that make sense of have under version control. Then files “suddenly disappearing” is not a problem, because the only files Mercurial tracks are the important ones, which you rarely remove, and if so, only manually after careful consideration. In that case, use hg rm file1 file2 to remove those files both from the file system and from mercurial — no need for addremove.

hg addremove is a useful shorthand if you screwed up and made significant changes to the project layout via some tool other than Mercurial, especially since it properly handles copies/renames. Note that you can restrict it to some files by giving, for example, hg addremove src/. But it should never override good judgement of what belongs under source control and what doesn’t. If you accidentally added a file that shouldn’t be under source control, use hg forget the-file before committing.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Why isn’t the addremove recommended by default in Mercurial?

This is perhaps a question of strategy more than anything else. I am new to version control and I guess I should count myself lucky to have relatively more mature systems like Mercurial and Git at my disposal as compared to the older systems.

I started with Hg because I read somewhere that it’s more Pythonlike in its approach. The few tutorials that I went through (examples and videos) consistently use the command hg add *. After using that command for some time now on my project, I have a long list of files which have ! in front of the files that have been deleted. I am speaking of the output of the command hg st of course.

I guess using hg addremove * will solve my problem. If that’s the case, why isn’t it the default command to teach Hg to a beginner? Is there a pitfall I am missing? Wouldn’t it be reasonable to assume that typically a person working on a folder would want the files which are deleted to visibly disappear from the output of hg st (esp. since they are stored in the repository by Hg anyways)?

hg add * is a terribly idea. The tutorials you’ve read/watched probably weren’t very good. Most repositories contain many files that you don’t want to put under version control: Generated artifacts, junk from experiments you did, and files that should be part of the repository but only later (i.e., are not ready to be committed). You don’t want to version control those. Unless they are only temporary, they should be listed in .hgignore so they won’t pollute the output of hg status with ?s and won’t be added accidentally. hg add and hg addremove already consider all files, except ignored ones, and hg add * and hg addremove * override this sane default. So it’s not only redundant, but also breaks a very useful feature.

You should only add the files that make sense of have under version control. Then files “suddenly disappearing” is not a problem, because the only files Mercurial tracks are the important ones, which you rarely remove, and if so, only manually after careful consideration. In that case, use hg rm file1 file2 to remove those files both from the file system and from mercurial — no need for addremove.

hg addremove is a useful shorthand if you screwed up and made significant changes to the project layout via some tool other than Mercurial, especially since it properly handles copies/renames. Note that you can restrict it to some files by giving, for example, hg addremove src/. But it should never override good judgement of what belongs under source control and what doesn’t. If you accidentally added a file that shouldn’t be under source control, use hg forget the-file before committing.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Why isn’t the addremove recommended by default in Mercurial?

This is perhaps a question of strategy more than anything else. I am new to version control and I guess I should count myself lucky to have relatively more mature systems like Mercurial and Git at my disposal as compared to the older systems.

I started with Hg because I read somewhere that it’s more Pythonlike in its approach. The few tutorials that I went through (examples and videos) consistently use the command hg add *. After using that command for some time now on my project, I have a long list of files which have ! in front of the files that have been deleted. I am speaking of the output of the command hg st of course.

I guess using hg addremove * will solve my problem. If that’s the case, why isn’t it the default command to teach Hg to a beginner? Is there a pitfall I am missing? Wouldn’t it be reasonable to assume that typically a person working on a folder would want the files which are deleted to visibly disappear from the output of hg st (esp. since they are stored in the repository by Hg anyways)?

hg add * is a terribly idea. The tutorials you’ve read/watched probably weren’t very good. Most repositories contain many files that you don’t want to put under version control: Generated artifacts, junk from experiments you did, and files that should be part of the repository but only later (i.e., are not ready to be committed). You don’t want to version control those. Unless they are only temporary, they should be listed in .hgignore so they won’t pollute the output of hg status with ?s and won’t be added accidentally. hg add and hg addremove already consider all files, except ignored ones, and hg add * and hg addremove * override this sane default. So it’s not only redundant, but also breaks a very useful feature.

You should only add the files that make sense of have under version control. Then files “suddenly disappearing” is not a problem, because the only files Mercurial tracks are the important ones, which you rarely remove, and if so, only manually after careful consideration. In that case, use hg rm file1 file2 to remove those files both from the file system and from mercurial — no need for addremove.

hg addremove is a useful shorthand if you screwed up and made significant changes to the project layout via some tool other than Mercurial, especially since it properly handles copies/renames. Note that you can restrict it to some files by giving, for example, hg addremove src/. But it should never override good judgement of what belongs under source control and what doesn’t. If you accidentally added a file that shouldn’t be under source control, use hg forget the-file before committing.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật