Skip to content
Snippets Groups Projects
  1. May 01, 2012
  2. Apr 30, 2012
  3. Apr 29, 2012
  4. Apr 30, 2012
    • Patrick Mézard's avatar
      4955e7bf
    • Patrick Mézard's avatar
      subrepo/svn: fix checked out rev number retrieval (issue2968) · ae2664ee
      Patrick Mézard authored
      The initial version was to take the "Revision" field from svn info. It works
      but produces false positive when parent paths are being moved or unrelated
      changes are being committed, causing it to change while the svn checkout itself
      remains the same. To avoid spurious commit, we took "Revision" and "Last
      Changed Rev" for general comparison and kept the latter to answer "what is your
      revision?" question. This is better but fails when the subrepo path exists at
      "Revision" but not at "Last Changed Rev". This patch adds a check for this, and
      returns "Revision" if the path does not exist. We try to avoid doing this as
      much as possible at it implies an extra, *remote* call.
      ae2664ee
    • Patrick Mézard's avatar
      amend: fix copy records handling (issue3410) · 9224cc2e
      Patrick Mézard authored
      Messing with the dirstate before the intermediate commit seems error prone.
      Instead, commit and recompute the copies with copies.pathcopies(), then use
      that with commitctx().
      
      Since copies.pathcopies() does not support file replacement very well, the
      whole .renamed() condition in samefile() is removed and the "file replacement
      caused by differing copy source" effect is discarded.
      
      Test shamelessly stolen from Idan Kamara <idankk86@gmail.com>
      9224cc2e
    • Patrick Mézard's avatar
      test-commit-amend: exhibit an --amend weirdness · 90ca344a
      Patrick Mézard authored
      The weirdness is --amend let you replace one file with another with same data
      and flags if the new file copy record differ from the one in the parent
      revision. In theory, there is no problem with this kind of thing, subversion
      supports it, but here we see log and status disagree. The reason is log reads
      the copy record from the filelog, while status calls copies.pathcopies() which
      eventually invokes some expensiveness argument to discard this case (copies.py,
      _forwardcopies(), line 132). Since the next patch will side with pathcopies(),
      I prefer to call this behaviour a bug.
      90ca344a
  5. Apr 29, 2012
  6. Apr 30, 2012
  7. Apr 28, 2012
  8. Apr 27, 2012
  9. Apr 28, 2012
    • Patrick Mézard's avatar
      commit: abort on merge with missing files · 63c817ea
      Patrick Mézard authored
      Here is a script illustrating the previous behaviour:
      
      The merge brings a new file 'b' from remote
        $ hg merge 1 --debug
          searching for copies back to rev 1
          unmatched files in other:
           b
        resolving manifests
         overwrite: False, partial: False
         ancestor: 07f494440405, local: 540395c44225+, remote: 102a90ea7b4a
         b: remote created -> g
        updating: b 1/1 files (100.00%)
        getting b
        1 files updated, 0 files merged, 0 files removed, 0 files unresolved
        (branch merge, don't forget to commit)
      
      Delete but do not remove b
        $ rm b
        $ hg st
        ! b
      
      The commit succeeds
        $ hg commit -m merge
        $ hg parents --template "{rev} {desc|firstline} files: {files}\n"
        3 merge files:
        $ hg st
        ! b
      
      b changes were ignored, but even b existence was ignored
        $ hg manifest
        a
      
      This happens because localrepo.commitctx() checks the input ctx.files(), which
      is empty for workingctx.files() only returns added, modified or removed
      entries, and bypass files/manifest updates completely. So the committed
      revision manifest is the same as its first parent one, not containing the 'b'
      file.
      
      This patch forces the commit to abort in presence of a merge and missing files.
      test-merge4.t is modified accordingly as it was introduced to check hg was not
      just terminating with a traceback (5e9e8b8d2629).
      63c817ea
  10. Apr 24, 2012
    • Pierre-Yves David's avatar
      branchmap: server should not advertise secret changeset in branchmap (Issue3303) · 39d1f83e
      Pierre-Yves David authored
      Discovery now use an overlay above branchmap to prune invisible "secret"
      changeset from branchmap.
      
      To minimise impact on the code during the code freeze, this is achieve by
      recomputing non-secret heads on the fly when any secret changeset exists. This
      is a computation heavy approach similar to the one used for visible heads. But
      few sever should contains secret changeset anyway.  See comment in code for more
      robust approach.
      
      On local repo the wrapper is applied explicitly while the wire-protocol take
      care of wrapping branchmap call in a transparent way. This could be unified by
      the Peter Arrenbrecht and Sune Foldager proposal of a `peer` object.
      
      An inappropriate `(+i heads)` may still appear when pushing new changes on a
      repository with secret changeset. (see Issue3394 for details)
      39d1f83e
  11. Apr 27, 2012
  12. Apr 26, 2012
    • Pierre-Yves David's avatar
      wireprotocol: use visibleheads as reference while unbundling (issue 3303) · 9eba72cd
      Pierre-Yves David authored
      The `repo` object here is *always* local. Using `repo.heads()` ensure we will
      reject push if any secret changeset exists.
      
      During discovery, `visibleheads` were sent to the peer. So we can only expect it
      to send us `visibleheads` back. If any secret changeset exists::
      
          visibleheads != repo.heads()
      
      This fix server side part of issue 3303 when pushing over the wire.
      9eba72cd
  13. Apr 25, 2012
    • Patrick Mézard's avatar
      rebase: preserve mq series order, guarded patches (issue2849) · b9f51f49
      Patrick Mézard authored
      The previous code was rebasing an applied series like:
      
        patch1 +guarded
        patch2
        patch3 +guarded
        patch4
        patch5 +guarded
      
      into:
      
        patch2
        patch4
        patch1 +guarded
        patch3 +guarded
        patch5 +guarded
      
      Reported by Lars Westerhoff <lars.westerhoff@newtec.eu>
      
      Also rename mq.series_dirty into mq.seriesdirty, missed by 599a72895c0d, and
      without effect since mq.qimport() was setting it already.
      b9f51f49
  14. Apr 26, 2012
    • Patrick Mézard's avatar
      subrepo/svn: improve error message on missing files · e37199a1
      Patrick Mézard authored
      From:
      
        abort: failed to commit svn changes
      
      to:
      
        abort: cannot commit missing svn entries
      e37199a1
    • Patrick Mézard's avatar
      subrepo/svn: abort on commit with missing file (issue3029) · 3d5d204a
      Patrick Mézard authored
      Previous code was printing a traceback because it expected some error output
      from svn. But sometimes our definition of "changed" differs with the subversion
      one. For instance, subversion ignores missing files when committing. And when
      there are only missing files, svn commit will be a successful no-op with no
      output. Still, we should stick to our definition including missing files in
      changes as doing otherwise could cause surprising behaviour for the user.
      3d5d204a
    • Katsunori FUJIWARA's avatar
      doc: flatten description of 'matching()' predicate to be formatted well · 5d803620
      Katsunori FUJIWARA authored
      current description of 'matching()' revset predicate can't be
      formatted well on "hg help revset" output.
      
      each descriptions for revset predicates (or something like them) are
      split-ed into lines, and spaces on left side of them are stripped
      before minirst processing. so, bullet list can't be nested.
      
      this patch just flattens description of 'matching()' predicate to be
      formatted well.
      5d803620
  15. Apr 27, 2012
  16. Apr 26, 2012
Loading