Mercurial > hg
changeset 3593:9bfb3c049b2a
merge with backout
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 31 Oct 2006 13:03:23 +0100 |
parents | fffc8a733bf9 (current diff) c2f82db92ae1 (diff) |
children | 5f08389bcf06 |
files | mercurial/merge.py |
diffstat | 3 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Oct 31 13:02:49 2006 +0100 +++ b/mercurial/commands.py Tue Oct 31 13:03:23 2006 +0100 @@ -914,8 +914,9 @@ See pull for valid source format details. It is possible to specify an ssh:// URL as the destination, but no - .hg/hgrc will be created on the remote side. Look at the help text - for the pull command for important details about ssh:// URLs. + .hg/hgrc and working directory will be created on the remote side. + Look at the help text for the pull command for important details + about ssh:// URLs. """ setremoteconfig(ui, opts) hg.clone(ui, ui.expandpath(source), dest,
--- a/mercurial/merge.py Tue Oct 31 13:02:49 2006 +0100 +++ b/mercurial/merge.py Tue Oct 31 13:03:23 2006 +0100 @@ -388,7 +388,7 @@ raise util.Abort(_("update spans branches, use 'hg merge' " "or 'hg update -C' to lose changes")) if branchmerge and not forcemerge: - if wc.modified() or wc.added() or wc.removed(): + if wc.files(): raise util.Abort(_("outstanding uncommitted changes")) ### calculate phase
--- a/mercurial/revlog.py Tue Oct 31 13:02:49 2006 +0100 +++ b/mercurial/revlog.py Tue Oct 31 13:03:23 2006 +0100 @@ -467,7 +467,7 @@ def tip(self): return self.node(len(self.index) - 1) def count(self): return len(self.index) def node(self, rev): - return (rev < 0) and nullid or self.index[rev][-1] + return rev == nullrev and nullid or self.index[rev][-1] def rev(self, node): try: return self.nodemap[node] @@ -490,8 +490,8 @@ return (self.rev(d[0]), self.rev(d[1])) return d def start(self, rev): - if rev < 0: - return nullrev + if rev == nullrev: + return 0 if self.version != REVLOGV0: return self.ngoffset(self.index[rev][0]) return self.index[rev][0] @@ -500,6 +500,8 @@ def size(self, rev): """return the length of the uncompressed text for a given revision""" + if rev == nullrev: + return 0 l = -1 if self.version != REVLOGV0: l = self.index[rev][2] @@ -530,11 +532,15 @@ """ def length(self, rev): - if rev < 0: + if rev == nullrev: return 0 else: return self.index[rev][1] - def base(self, rev): return (rev < 0) and rev or self.index[rev][-5] + def base(self, rev): + if (rev == nullrev): + return nullrev + else: + return self.index[rev][-5] def reachable(self, rev, stop=None): reachable = {}