Package com.aragost.javahg

Examples of com.aragost.javahg.Bookmark


                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
            return result;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here


                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
            return result;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here

        BookmarksCommand.on(repo).create("a");
        Assert.assertEquals(1, BookmarksCommand.on(repo).list().size());
        BookmarksCommand.on(repo).rename("a", "b");
        List<Bookmark> list = BookmarksCommand.on(repo).list();
        Assert.assertEquals(1, list.size());
        Bookmark bm = list.get(0);
        Assert.assertEquals("b", bm.getName());
        Assert.assertTrue("b", bm.isActive());
    }
View Full Code Here

    @Test
    public void testActive() throws IOException {
        Repository repo = getTestRepository();
        createChangeset();
        BookmarksCommand.on(repo).create("a");
        Bookmark bm = Utils.single(BookmarksCommand.on(repo).list());
        Assert.assertTrue(bm.isActive());

        Changeset cs2 = createChangeset();
        bm = Utils.single(BookmarksCommand.on(repo).list());
        Assert.assertSame(cs2, bm.getChangeset());
        Assert.assertTrue(bm.isActive());
    }
View Full Code Here

        BookmarksCommand.on(repo).create("a");
        Changeset cs = createChangeset();

        List<Bookmark> list = BookmarksCommand.on(repo).list();
        Assert.assertEquals(2, list.size());
        Bookmark bm = list.get(0);
        Assert.assertEquals("a", bm.getName());
        Assert.assertEquals(cs, bm.getChangeset());
        Assert.assertTrue(bm.isActive());
        bm = list.get(1);
        Assert.assertEquals("bookmark", bm.getName());
        Assert.assertNull(bm.getChangeset());
        Assert.assertFalse(bm.isActive());
    }
View Full Code Here

                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(':');
                name = name.substring(0, name.lastIndexOf(' ')).trim();
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
            return result;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here

TOP

Related Classes of com.aragost.javahg.Bookmark

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.