Commit Graph

4 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
1b0518593c hg: make parseurl() consistently return normalised path
Before this the path was only normalised when a fragment was used.
2011-04-06 12:48:59 +02:00
Sune Foldager
4e663d3541 improve --branch processing (and differentiate from # syntax)
Previously #foo and --branch foo were handled identically.
The behavior of #foo hasn't changed, but --branch now works like this:

1) If branchmap is not supported on the remote, the operation fails.
2) If branch is '.', substitute with branch of the working dir parent.
3) If branch exists remotely, its heads are expanded.
4) Otherwise, the operation fails.

Tests have been added for the new cases.
2010-06-10 12:46:09 +02:00
Sune Foldager
5020620fca interpret repo#name url syntax as branch instead of revision
Previously, the name part of an repo#name url was interpreted as a
revision, similar to using the --rev option. Now it is instead looked
up as a branch first, and if that succeeds all the heads of the branch
will be processed instead of just its tip-most head. If the branch
lookup fails, it will be assumed to be an revision as before (e.g. for
tags).
2010-02-07 14:29:07 +01:00
Martijn Pieters
4abe231925 hg: allow hg.parseurl(url, None)
In many places hg.parseurl is called with a url and "opts.get('rev')",
suggesting the second, optional argument can be None. Because opts['rev']
usually defaults to [] this never happens in practice.

However, extensions don't necessarily behave the same, but do copy this
pattern.

Also, include wider hg.parseurl tests, beyond a demonstration of the problem.
2009-04-24 18:17:42 +02:00