[PATCH] Infer a --repository argument from command arguments when reasonable

Thomas Arendsen Hein thomas at intevation.de
Tue Jan 29 17:41:49 CST 2008


* Jesse Glick <Jesse.Glick at sun.com> [20080125 10:16]:
> # HG changeset patch
> # User Jesse Glick <jesse.glick at sun.com>
> # Date 1201252292 18000
> # Node ID 8290351db7f1f0259c58e51f4cb2647cb43c94a4
> # Parent  0387b491ec3431f3996a1259f7a445dea24964c6
> Infer a --repository argument from command arguments when reasonable.
> In particular: if invoked without -R from a CWD not inside a repo, having been
> passed one or more file paths as command arguments, where the nearest enclosing
> repo of all of those paths is the same, quietly infer a -R option for that repo.
> Otherwise abort with an error message as before.

This might be too much magic.

People should be aware in which repository they are working.
Additionally this will always be inconsistent with nested repos and
with commands accepting two paths, e.g. hg mv repo1/foo repo2/foo

Thomas

-- 
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Osnabrueck - Register: Amtsgericht Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner


More information about the Mercurial-devel mailing list