convert: fix mercurial_sink.putcommit
Changeset
4ebc8693ce72 added some code to putcommit to avoid creating a
revision that touches no files, but this can break regular conversions
from some repositories:
- conceptually, since we're converting a repo, we should try to make
the new hg repo as similar as possible to the original repo - we
should create a new changeset, even if the original revision didn't
touch any files (maybe the commit message had some important bit);
- even if a "regular" revision that doesn't touch any file may seem
weird (and maybe even broken), it's completely legitimate for a merge
revision to not touch any file, and, if we just skip it, the
converted repo will end up with wrong history and possibly an extra
head.
As an example, say the crew and main hg repos are sync'ed. Somebody
sends an important patch to the mailing list. Matt quickly applies
and pushes it. But at the same time somebody also applies it to crew
and pushes it. Suppose the commit message ended up being a bit
different (say, there was a typo and somebody didn't fix it) or that
the date ended up being different (because of different patch-applying
scripts): the changeset hashes will be different, but the manifests
will be the same.
Since both changesets were pushed to public repos, it's hard to recall
them. If both are merged, the manifest from the resulting merge
revision will have the exact same contents as its parents - i.e. the
merge revision really doesn't touch any file at all.
To keep the file filtering stuff "working", the generic code was changed
to skip empty revisions if we're filtering the repo, fixing a bug in the
process (we want parents[0] instead of tip).
Mercurial Distributed SCM
basic commands:
add add the specified files on the next commit
annotate show changeset information per file line
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge working directory with another revision
parents show the parents of the working dir or revision
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
revert revert files or dirs to their states as of some revision
serve export the repository via HTTP
status show changed files in the working directory
update update working directory
use "hg help" for the full list of commands or "hg -v" for details
add add the specified files on the next commit
annotate show changeset information per file line
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge working directory with another revision
parents show the parents of the working dir or revision
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
revert revert files or dirs to their states as of some revision
serve export the repository via HTTP
status show changed files in the working directory
update update working directory
Mercurial Distributed SCM
list of commands:
add add the specified files on the next commit
addremove add all new files, delete all missing files
annotate show changeset information per file line
archive create unversioned archive of a repository revision
backout reverse effect of earlier changeset
branch set or show the current branch name
branches list repository named branches
bundle create a changegroup file
cat output the current or given revision of files
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
copy mark files as copied for the next commit
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
grep search for a pattern in specified files and revisions
heads show current repository heads or show branch heads
help show help for a command, extension, or list of commands
identify identify the working copy or specified revision
import import an ordered set of patches
incoming show new changesets found in source
init create a new repository in the given directory
locate locate files matching specific patterns
log show revision history of entire repository or files
manifest output the current or given revision of the project manifest
merge merge working directory with another revision
outgoing show changesets not found in destination
parents show the parents of the working dir or revision
paths show definition of symbolic path names
pull pull changes from the specified source
push push changes to the specified destination
recover roll back an interrupted transaction
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
revert revert files or dirs to their states as of some revision
rollback roll back the last transaction in this repository
root print the root (top) of the current working dir
serve export the repository via HTTP
showconfig show combined config settings from all hgrc files
status show changed files in the working directory
tag add a tag for the current or given revision
tags list repository tags
tip show the tip revision
unbundle apply one or more changegroup files
update update working directory
verify verify the integrity of the repository
version output version and copyright information
use "hg -v help" to show aliases and global options
add add the specified files on the next commit
addremove add all new files, delete all missing files
annotate show changeset information per file line
archive create unversioned archive of a repository revision
backout reverse effect of earlier changeset
branch set or show the current branch name
branches list repository named branches
bundle create a changegroup file
cat output the current or given revision of files
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
copy mark files as copied for the next commit
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
grep search for a pattern in specified files and revisions
heads show current repository heads or show branch heads
help show help for a command, extension, or list of commands
identify identify the working copy or specified revision
import import an ordered set of patches
incoming show new changesets found in source
init create a new repository in the given directory
locate locate files matching specific patterns
log show revision history of entire repository or files
manifest output the current or given revision of the project manifest
merge merge working directory with another revision
outgoing show changesets not found in destination
parents show the parents of the working dir or revision
paths show definition of symbolic path names
pull pull changes from the specified source
push push changes to the specified destination
recover roll back an interrupted transaction
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
revert revert files or dirs to their states as of some revision
rollback roll back the last transaction in this repository
root print the root (top) of the current working dir
serve export the repository via HTTP
showconfig show combined config settings from all hgrc files
status show changed files in the working directory
tag add a tag for the current or given revision
tags list repository tags
tip show the tip revision
unbundle apply one or more changegroup files
update update working directory
verify verify the integrity of the repository
version output version and copyright information
hg add [OPTION]... [FILE]...
add the specified files on the next commit
Schedule files to be version controlled and added to the repository.
The files will be added to the repository at the next commit. To
undo an add before that, see hg revert.
If no names are given, add all files in the repository.
options:
-I --include include names matching the given patterns
-X --exclude exclude names matching the given patterns
-n --dry-run do not perform actions, just print output
use "hg -v help add" to show global options
hg add: option --skjdfks not recognized
hg add [OPTION]... [FILE]...
add the specified files on the next commit
Schedule files to be version controlled and added to the repository.
The files will be added to the repository at the next commit. To
undo an add before that, see hg revert.
If no names are given, add all files in the repository.
options:
-I --include include names matching the given patterns
-X --exclude exclude names matching the given patterns
-n --dry-run do not perform actions, just print output
use "hg -v help add" to show global options
hg diff [OPTION]... [-r REV1 [-r REV2]] [FILE]...
diff repository (or selected files)
Show differences between revisions for the specified files.
Differences between files are shown using the unified diff format.
NOTE: diff may generate unexpected results for merges, as it will
default to comparing against the working directory's first parent
changeset if no revisions are specified.
When two revision arguments are given, then changes are shown
between those revisions. If only one revision is specified then
that revision is compared to the working directory, and, when no
revisions are specified, the working directory files are compared
to its parent.
Without the -a option, diff will avoid generating diffs of files
it detects as binary. With -a, diff will generate a diff anyway,
probably with undesirable results.
options:
-r --rev revision
-a --text treat all files as text
-p --show-function show which function each change is in
-g --git use git extended diff format
--nodates don't include dates in diff headers
-w --ignore-all-space ignore white space when comparing lines
-b --ignore-space-change ignore changes in the amount of white space
-B --ignore-blank-lines ignore changes whose lines are all blank
-I --include include names matching the given patterns
-X --exclude exclude names matching the given patterns
use "hg -v help diff" to show global options
hg status [OPTION]... [FILE]...
show changed files in the working directory
Show status of files in the repository. If names are given, only
files that match are shown. Files that are clean or ignored, are
not listed unless -c (clean), -i (ignored) or -A is given.
NOTE: status may appear to disagree with diff if permissions have
changed or a merge has occurred. The standard diff format does not
report permission changes and diff only reports changes relative
to one merge parent.
If one revision is given, it is used as the base revision.
If two revisions are given, the difference between them is shown.
The codes used to show the status of files are:
M = modified
A = added
R = removed
C = clean
! = deleted, but still tracked
? = not tracked
I = ignored (not shown by default)
= the previous added file was copied from here
aliases: st
options:
-A --all show status of all files
-m --modified show only modified files
-a --added show only added files
-r --removed show only removed files
-d --deleted show only deleted (but tracked) files
-c --clean show only files without changes
-u --unknown show only unknown (not tracked) files
-i --ignored show only ignored files
-n --no-status hide status prefix
-C --copies show source of copied files
-0 --print0 end filenames with NUL, for use with xargs
--rev show difference from revision
-I --include include names matching the given patterns
-X --exclude exclude names matching the given patterns
use "hg -v help status" to show global options
hg status [OPTION]... [FILE]...
show changed files in the working directory
hg: unknown command 'foo'
Mercurial Distributed SCM
basic commands:
add add the specified files on the next commit
annotate show changeset information per file line
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge working directory with another revision
parents show the parents of the working dir or revision
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
revert revert files or dirs to their states as of some revision
serve export the repository via HTTP
status show changed files in the working directory
update update working directory
use "hg help" for the full list of commands or "hg -v" for details
hg: unknown command 'skjdfks'
Mercurial Distributed SCM
basic commands:
add add the specified files on the next commit
annotate show changeset information per file line
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge working directory with another revision
parents show the parents of the working dir or revision
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
revert revert files or dirs to their states as of some revision
serve export the repository via HTTP
status show changed files in the working directory
update update working directory
use "hg help" for the full list of commands or "hg -v" for details