Mercurial > kallithea
changeset 4558:18f6bdd1e3fc
hg: make get_ref_revision('rev', '00000000000000') give the null revision
It gave tip revision and caused weird pull request diffs and lots of grief when
(accidentally) creating a pull request from the null revision.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 03 Oct 2014 00:20:36 +0200 |
parents | cb360bf40863 |
children | f4c60fafac54 |
files | kallithea/lib/vcs/backends/hg/repository.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/hg/repository.py Fri Oct 03 00:20:36 2014 +0200 +++ b/kallithea/lib/vcs/backends/hg/repository.py Fri Oct 03 00:20:36 2014 +0200 @@ -452,6 +452,8 @@ Returns revision number for the given reference. """ ref_name = safe_str(ref_name) + if ref_type == 'rev' and not ref_name.strip('0'): + return self.EMPTY_CHANGESET # lookup up the exact node id _revset_predicates = { 'branch': 'branch',