def setUpClass(cls): hg = helpers.HgClient(os.path.join(_tmpdir, cls.__name__)) hg.init() hg.ftouch('a') hg.addremove() hg.commit('-m', 'commit to default') hg.commit('--close-branch', '-m', 'close default branch') cls.repo = thgrepo.repository(path=hg.path)
def setUpClass(cls): hg = helpers.HgClient(os.path.join(_tmpdir, cls.__name__)) hg.init() hg.ftouch('foo', 'bar', 'baz/bax', 'baz/box') hg.addremove() hg.commit('-m', 'foobar') hg.fwrite('bar', 'hello\n') hg.remove('baz/box') hg.ftouch('zzz') hg.addremove() hg.commit('-m', 'remove baz/box, add zzz, modify bar') cls.repo = thgrepo.repository(path=hg.path)
def setUpClass(cls): hg = helpers.HgClient(os.path.join(_tmpdir, cls.__name__)) hg.init() hg.ftouch('a') hg.addremove() hg.commit('-m', 'commit to default') for name in ('foo', 'bar', 'baz'): hg.update('0') hg.fappend('a', name + '\n') hg.branch(name) hg.commit('-m', 'create %s branch' % name) hg.commit('--close-branch', '-m', 'close baz branch') hg.update('foo') # current branch will be listed first cls.repo = thgrepo.repository(path=hg.path)
def setUpClass(cls): # TODO: make this compatible with binary-unsafe filesystem if os.name != 'posix' or sys.platform == 'darwin': raise SkipTest cls.encodingpatch = helpers.patchencoding('euc-jp') # include non-ascii char in repo path to test concatenation hg = helpers.HgClient(os.path.join( _tmpdir, cls.__name__ + _aloha_ja.encode('euc-jp'))) hg.init() hg.ftouch(_aloha_ja.encode('euc-jp')) hg.ftouch(_aloha_ja.encode('euc-jp') + '.txt') hg.addremove() hg.commit('-m', 'add aloha') cls.repo = thgrepo.repository(path=hg.path)
def setup(): global _tmpdir _tmpdir = helpers.mktmpdir(__name__) # foo0 -- foo1 ---------- foo3 -------------------------- foo7 # \ \ # \ -------------------- baz4 -- baz5 -- baz6 -------- # \ / \ # ---------- bar2 ------------------------------------------ bar8 # [branch: bar] hg = helpers.HgClient(os.path.join(_tmpdir, 'named-branch')) hg.init() hg.fappend('data', 'foo0') hg.commit('-Am', 'foo0') hg.fappend('data', 'foo1\n') hg.commit('-m', 'foo1') hg.update('0') hg.branch('bar') hg.fappend('data', 'bar2\n') hg.commit('-m', 'bar2') hg.update('1') hg.fappend('data', 'foo3\n') hg.commit('-m', 'foo3') hg.update('1') hg.fappend('data', 'baz4\n') hg.commit('-m', 'baz4') hg.fappend('data', 'baz5\n') hg.commit('-m', 'baz5') hg.merge('--tool=internal:local', '2') hg.commit('-m', 'baz6') hg.update('3') hg.fappend('data', 'foo7\n') hg.commit('-m', 'foo7') hg.update('2') hg.merge('--tool=internal:local', '6') hg.commit('-m', 'bar8')
def setUp(self): if not hasattr(wconfig.config(), 'write'): raise SkipTest self.hg = helpers.HgClient(helpers.mktmpdir(__name__)) self.hg.init()