Siddharth Agarwal <sid0@fb.com> [Tue, 18 Nov 2014 22:21:03 -0800] rev 23690
export: explicitly honor all diffopts
This is slightly more controversial than diff, but we hope that HGPLAIN=1
covers all the format-breaking ones.
A possible alternative here that breaks BC is to honor all opts except the
whitespace ones.
Siddharth Agarwal <sid0@fb.com> [Fri, 21 Nov 2014 16:16:03 -0800] rev 23689
webcommands.annotate: explicitly only honor whitespace diffopts
The whitespace ones are the only ones the annotate logic cares about anyway, so
there's no visible impact.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 23 Dec 2014 18:29:03 -0800] rev 23688
filectx.parents: filter nullrev parent sooner
We are going to introduce a linkrev-correction phases when computing parents.
It will be more convenient to have the nullid parent filtered out earlier. I
had to make a minimal adjustment to the rename handling logic to keep it
functional. That logic have been documented in the process since it took me
some time to check all the cases out.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 23 Dec 2014 17:13:51 -0800] rev 23687
context: catch FilteredRepoLookupError instead of RepoLookupError
Now that we have a more specialised exception, lets use it when we meant to
catch the more specialised case.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 27 Nov 2014 10:16:56 -0500] rev 23686
narrowmatcher: propagate the rel() method
The full path is propagated to the original match object since this is often
used directly for printing a file name to the user. This is cleaner than
requiring each caller to join the prefix with the file name prior to calling it,
and will lead to not having to pass the prefix around separately. It is also
consistent with the bad() and abs() methods in terms of the required input. The
uipath() method now inherits this path building property.
There is no visible change in path style for rel() because it ultimately calls
util.pathto(), which returns an os.sep based path. (The previous os.path.join()
was violating the documented usage of util.pathto(), that its third parameter be
'/' separated.) The doctest needed to be normalized to '/' separators to avoid
test differences on Windows, now that a full path is returned for a short
filename.
The test changes are to drop globs that are no longer necessary when printing an
absolute file in a subrepo, as returned from match.uipath(). Previously when
os.path.join() was used to add the prefix, the absolute path to a file in a
subrepo was printed with a mix of '/' and '\'. The absolute path for a file not
in a subrepo, as returned from match.uipath(), is still purely '/' based.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 28 Nov 2014 20:15:46 -0500] rev 23685
match: add the abs() method
This is a utility to make it easier for subrepos to convert a file name to the
full path rooted at the top repository. It can replace the various path joining
lambdas, and doesn't require the prefix to be passed into the method that wishes
to build such a path.
The name is derived from the following pattern in annotate() and other places:
name = ((pats and rel) or abs)
The pathname separator is not os.sep in part to avoid confusion with variables
named 'abs' or similar that _are_ '/' separated, and in part because some
methods like cmdutils.forget() and maybe cmdutils.add() need to build a '/'
separated path to the root repo. This can replace the manual path building
there.