# HG changeset patch # User Pierre-Yves David # Date 1315494691 -7200 # Node ID 19b22ad56b326511c2bbc8320b7af5eae5abddf9 # Parent 4e804af47e57007b79a191b932220723f1b51c78 clone support diff -r 4e804af47e57 -r 19b22ad56b32 obsolete.py --- a/obsolete.py Thu Sep 08 16:54:01 2011 +0200 +++ b/obsolete.py Thu Sep 08 17:11:31 2011 +0200 @@ -178,6 +178,11 @@ finally: f.close() + ### local clone support + + def cancopy(self): + return not bool(self._obsobjrels) # you can't copy if there is obsolete + ### pull // push support def pull(self, remote, *args, **kwargs): diff -r 4e804af47e57 -r 19b22ad56b32 tests/test-obsolete.t --- a/tests/test-obsolete.t Thu Sep 08 16:54:01 2011 +0200 +++ b/tests/test-obsolete.t Thu Sep 08 17:11:31 2011 +0200 @@ -180,5 +180,26 @@ 0 - 1f0dee641bb7 +clone support + $ hg clone . ../cloned + requesting all changes + adding changesets + adding manifests + adding file changes + added 8 changesets with 8 changes to 8 files (+4 heads) + updating to branch default + 4 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ qlog -R ../cloned + 7 + - 909a0fb57e5d + 4 + - 725c380fe99b + 3 + - 0d3f46688ccc + 1 + - 7c3bad9141dc + 0 + - 1f0dee641bb7 +