2011-01-21 3 views
3

私はマージする必要があるブランチをいくつか持っていますが、マージツールで変更の一部がどこから来ているのか分かりません。ローカルとその他の変更セットは明白ですが、ベースファイルの変更セットはどのようにして調べることができますか?私は数十の支店を持つリポジトリで働いているので、グラフを見て追跡することはあまりうまくいかない。水銀とのマージ時に、ベースファイルのチェンジセットIDを取得するにはどうすればよいですか?

答えて

4

、あなたは、2つのチェンジセットの共通の祖先を取得することができます:

hg log -r ancestor(rev1,rev2) 
1

hg grepコマンド試してみてください。

hg grep [OPTION]... PATTERN [FILE]... 

search for a pattern in specified files and revisions 

    Search revisions of files for a regular expression. 

    This command behaves differently than Unix grep. It only accepts 
    Python/Perl regexps. It searches repository history, not the working 
    directory. It always prints the revision number in which a match appears. 

    By default, grep only prints output for the first revision of a file in 
    which it finds a match. To get it to print every revision that contains a 
    change in match status ("-" for a match that becomes a non-match, or "+" 
    for a non-match that becomes a match), use the --all flag. 

    Returns 0 if a match is found, 1 otherwise. 

options: 

-0 --print0    end fields with NUL 
    --all     print all revisions that match 
-f --follow    follow changeset history, or file history across 
          copies and renames 
-i --ignore-case   ignore case when matching 
-l --files-with-matches print only filenames and revisions that match 
-n --line-number   print matching line numbers 
-r --rev REV [+]   only search files changed within revision range 
-u --user     list the author (long with -v) 
-d --date     list the date (short with -q) 
-I --include PATTERN [+] include names matching the given patterns 
-X --exclude PATTERN [+] exclude names matching the given patterns 
    --mq     operate on patch repository 

[+] marked option can be specified multiple times 

use "hg -v help grep" to show global options 

あなたが好きそれを使用することができます:

hg grep "a string" 

と、それが最初に追加されたリビジョンであなたを教えてくれますし。

検索の対象が少なく、overview-yの方が少ない場合は、を使用して各チェンジセットの変更ファイルを確認し、hg log -pを使用して実際の差分を確認できます。 revsets(Mercurialの1.6以降)を使用して

+1

私はマークの答えをupvoted。私は彼があなたがよく尋ねていたことを理解したと思う。 –

関連する問題