Suggestion: commands allow for path specification

Thomas Arendsen Hein thomas at intevation.de
Sat Aug 6 07:07:32 CDT 2005


* Julian Yap <julian_yap at yahoo.com> [20050804 05:27]:
> I have a suggestion.  For example with commands like 'hg update', they
> should allow for specification of paths so that change directory
> commands are not required.  That is, you shouldn't need to be in the
> repository directory to run commands.
> 
> Currently:
> cd my_clone_path
> hg update

You can already do 'hg -R my_clone_path update'

> Suggested:
> hg update my_clone_path

This would be nice, too, though it might conflict with nested
repositories. Imagine the following situation:

~/.hg (maybe leftover from wrong 'hg init', or poor man's backup)
~/repos/repo/.hg

Now you do this:
$ cd ~/.repos
$ hg update repo

Should the update happen in ~/.hg or in ~/repos/repo/.hg?

While your suggestion is very short (which is good), it might lead to
confusion, imaging people doing:
$ hg push ../otherrepo

Should there be a push from the current repo to the other repo, or
should the default-push target be pushed to from the other repo?

So while the current solution is a little bit more to type it is
much more predictable.

Thomas

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/


More information about the Mercurial mailing list