def test_simple(self): c1, c2, c3 = build_commit_graph(self.repo.object_store, [[1], [2, 1], [3, 1, 2]]) outstream = BytesIO() porcelain.rev_list(self.repo.path, [c3.id], outstream=outstream) self.assertEqual(c3.id + b"\n" + c2.id + b"\n" + c1.id + b"\n", outstream.getvalue())
def test_simple(self): c1, c2, c3 = build_commit_graph(self.repo.object_store, [[1], [2, 1], [3, 1, 2]]) outstream = BytesIO() porcelain.rev_list( self.repo.path, [c3.id], outstream=outstream) self.assertEqual( "%s\n%s\n%s\n" % (c3.id, c2.id, c1.id), outstream.getvalue())
def test_simple(self): c1, c2, c3 = build_commit_graph(self.repo.object_store, [[1], [2, 1], [3, 1, 2]]) outstream = StringIO() porcelain.rev_list( self.repo.path, [c3.id], outstream=outstream) self.assertEquals( "%s\n%s\n%s\n" % (c3.id, c2.id, c1.id), outstream.getvalue())
def run(self, args): opts, args = getopt(args, "", []) if len(args) < 1: print('Usage: dulwich rev-list COMMITID...') sys.exit(1) porcelain.rev_list('.', args)