Mercurial HOWTOs
October 27, 2012 by Chris Johnson. Filed under
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 378
Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 379
Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 380
Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 381
Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 382
Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 383
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 378
Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 379
Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 380
Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 381
Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 382
Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 383
howto, public.
I’m starting to use Mercurial on Bitbucket to manage shared projects, and I’m recording the problems I run into and their solutions.
Problem: hg commit yields “no username supplied”
Mercurial apparently doesn’t record which user checked out the repository in the metadata. (I’d love to know why.) I fixed this by creating an .hgrc file in my Linux home directory and dropping in it the following:
[ui]
username = FirstName LastName <email@add.ress>
Problem: *.pyc files committed
When adding directories recursively to my repository, nested *.pyc files were included. (Subversion ignores these files by default when adding a directory.) I don’t want compiled Python files to be version controlled, so I can ignore them with an .hgignore file at the top level of my repository:
syntax: glob
*.pyc
Problem: can’t commit an empty directory
Mercurial only recognizes directories as paths to the things it really cares about: regular old files. If a directory contains no files, one can’t commit it. The fix? Put a file in the directory.