fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wstępne wykorzystanie modułu logging.
[redakcja.git]
/
lib
/
wlrepo
/
mercurial_backend
/
document.py
diff --git
a/lib/wlrepo/mercurial_backend/document.py
b/lib/wlrepo/mercurial_backend/document.py
index
3f94097
..
fcfd14c
100644
(file)
--- a/
lib/wlrepo/mercurial_backend/document.py
+++ b/
lib/wlrepo/mercurial_backend/document.py
@@
-98,15
+98,20
@@
class MercurialDocument(wlrepo.Document):
return (True, False)
if self._revision.has_children():
return (True, False)
if self._revision.has_children():
+ print 'Update failed: has children.'
# can't update non-latest revision
return (False, False)
sv = self.shared()
# can't update non-latest revision
return (False, False)
sv = self.shared()
-
- if not sv.ancestorof(self) and not self.parentof(sv):
- return self._revision.merge_with(sv._revision, user=user)
- return (False, False)
+ if self.parentof(sv):
+ return (True, False)
+
+ if sv.ancestorof(self):
+ return (True, False)
+
+
+ return self._revision.merge_with(sv._revision, user=user)
finally:
lock.release()
finally:
lock.release()