[PATCH 9 of 9 RFC] commands: test repo.marker for mercurial repo

Sean Farley sean.michael.farley at gmail.com
Sun Mar 30 23:09:07 UTC 2014


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1396220387 18000
#      Sun Mar 30 17:59:47 2014 -0500
# Node ID 54506d39c7619537241d0375ecf2c666a47a22a9
# Parent  04fe1b7587eaaab6615cb9041fb2e4a97736eb80
commands: test repo.marker for mercurial repo

This is just an example of how markers can look in the output. After applying
this patch, run the following two commands:

$ hg log -r 8a6a86c9a5b5
changeset:   23305:8a6a86c9a5b5
bar:         b1
bar:         b2
bookmark:    @
foo:         f1
foo:         f2
tag:         mpm
tag:         mpm/@
tag:         mpm/default
parent:      23265:dfad9bb23ab4
user:        Pierre-Yves David <pierre-yves.david at fb.com>
date:        Tue Mar 18 14:29:33 2014 -0700
summary:     bundle2: support bundling of empty part (with a type)

$ hg log -r 8a6a86c9a5b5 -T "{foolist % '{label(\"log.foo\", \"{foo} \")}'}\n"
f1 f2

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4091,10 +4091,16 @@ def log(ui, repo, *pats, **opts):
     See :hg:`help templates` for more about pre-packaged styles and
     specifying custom templates.
 
     Returns 0 on success.
     """
+
+    repo.mark("foo", "f1", repo['8a6a86c9a5b5'].node())
+    repo.mark("foo", "f2", repo['8a6a86c9a5b5'].node())
+    repo.mark("bar", "b1", repo['8a6a86c9a5b5'].node())
+    repo.mark("bar", "b2", repo['8a6a86c9a5b5'].node())
+
     if opts.get('graph'):
         return cmdutil.graphlog(ui, repo, *pats, **opts)
 
     matchfn = scmutil.match(repo[None], pats, opts)
     limit = cmdutil.loglimit(opts)



More information about the Mercurial-devel mailing list