[PATCH 2 of 3] Ignore darcs administrative directory

Thomas Arendsen Hein thomas at intevation.de
Sun Feb 25 12:21:45 UTC 2007


* Guy Brand <gb at isis.u-strasbg.fr> [20070224 20:15]:
> # HG changeset patch
> # User Guy Brand <gb at isis.u-strasbg.fr>
> # Date 1172050333 -3600
> # Node ID f77c66e897664f504738286d93ca839999bc2f02
> # Parent  9028722e609686fcf7a7675b4a1dd294b092dcfe
> Ignore darcs administrative directory
> 
> +		cmd("echo _darcs >> \"%s/.hgignore\"" % (hg_repo))

This ignores "foo_darcs.bar", too, as .hgignore still uses regular
expressions by default. Prepend a line with "syntax: glob".

Additionally you can save quoting.

Please test this patch:

# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Date 1172406055 -3600
# Node ID 513a54c34d6370bec93bbddd7697e2d2cc3d7933
# Parent  b53c6f7dbb1f49767217c0ddf1e838e6c651ceea
Ignore darcs administrative directory

diff -r b53c6f7dbb1f -r 513a54c34d63 contrib/darcs2hg.py
--- a/contrib/darcs2hg.py	Wed Feb 21 00:38:06 2007 +0100
+++ b/contrib/darcs2hg.py	Sun Feb 25 13:20:55 2007 +0100
@@ -158,6 +158,8 @@ if __name__ == "__main__":
 		sys.exit(-1)
 	if skip == None:
 		cmd("hg init \"%s\"" % (hg_repo))
+		cmd("echo 'syntax: glob' >> .hgignore", hg_repo)
+		cmd("echo _darcs >> .hgignore", hg_repo)
 		cmd("darcs initialize", hg_repo)
 	# Get the changes from the Darcs repository
 	change_number = 0

Thomas

-- 
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Osnabrück - Registereintrag: Amtsgericht Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner



More information about the Mercurial mailing list