svn - Getting the changed type of files and the previous version in HG -


i collecting information using commit logs generated hg , svn.

svn sample:


r1667884 | kschenk | 2015-03-20 05:37:55 +0800 (fri, 20 mar 2015) | 1 line

#126118# fix malformed if statements in makefile.

hg sample:


**changeset: 276992:8b564af029aa

bookmark: writercompare01

tag: tip

parent: 266455:8565218dc235

user: thb@openoffice.org

date: fri mar 19 00:16:57 2010 +0100

summary: cws writercompare01: #i110237# changes tzvetelina as-is**

i know followings:

  1. if above commit infor related diff of 2 revisions, revision displayed revision (in svn 1667884) id , changeset(hg 276992:8b564af029aa) id. revision before committed or revision id after committed? if second 1 how related previous revision in svn , hg? can use hg diff -c changesetid previous version?

  2. when considering changeset first numerical portion considered revision id?

  3. is there command use changed type (modified, deleted, ignored , etc. ex: "m /openoffice/trunk/main/vcl/module_vcl.mk" ) in hg files changed each commit given above?

thank dr

i'm talking mercurial here:

ad 2) changeset id (referred globally unique hash or locally valid numeric id) indicates set of changes. if checkout repository revision 276992:8b564af029aa includes repository changes, including 1 made changeset.

ad 1) consider unfortunate terminology,but seem call 'the revision id after commit'.

you can use mercurials revset terminology walk history. if previous commit interested, , output of hg diff -c changesetid suits you, use hg diff -c changesetid^ instead (mind trailing ^). see hg revset

ad 3) here again, mercurials templating engine powerful: see hg templates on how custom-tailor log output need - allows excellent fine-tuning. if output of hg log -rxxx --stat insufficient you, i'd suggest case use template like:

hg log -rxxx --template="{file_adds % 'a {file}\n'}{file_mods % 'm {file}\n}{file_dels, 'r {file}\n'}"

where xxx changesetid want query; mimics output of hg st. maybe additionally make use of file_copies in template. mind concept of "ignored files" doesn't make sense when investigating changeset instead of state of working directory. if want list of files constitute revision, changed or not changed, there hg manifest you.


Popular posts from this blog